Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with model path #23

Open
Strift opened this issue Jun 15, 2023 · 0 comments
Open

Issue with model path #23

Strift opened this issue Jun 15, 2023 · 0 comments

Comments

@Strift
Copy link

Strift commented Jun 15, 2023

Hello 👋

When running artisan command through Laravel Sail, it seems that backslash characters are not escaped correctly.

Running a scout command as recommended by the docs:

artisan scout:import "App\Models\User"

results in this error:

   Error

  Class "AppModelsUser" not found

  at vendor/laravel/scout/src/Console/ImportCommand.php:37
     33▕     public function handle(Dispatcher $events)
     34▕     {
     35▕         $class = $this->argument('model');
     36▕
  ➜  37▕         $model = new $class;
     38▕
     39▕         $events->listen(ModelsImported::class, function ($event) use ($class) {
     40▕             $key = $event->models->last()->getScoutKey();
     41▕

      +12 vendor frames

  13  artisan:35
      Illuminate\Foundation\Console\Kernel::handle()

Whereas running artisan manually through Sail works:

sail artisan scout:import "App\Models\User"

I first thought it was an issue with Scout but now I think it might be a plugin issue.

I "hope" it's the case and I'm not bothering you for nothing. 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant