laravel-cloudsearch icon indicating copy to clipboard operation
laravel-cloudsearch copied to clipboard

Support specific model

Open CasperLaiTW opened this issue 6 years ago • 0 comments

Problem:

The config only support 1 namespace, and in my project, I have 2 namespaces for models.

  1. App
  2. Applications\Models

config was setup model namespace = \\App, so mean I can't switch to other namespace.

Solution:

Get full namespace(specific model), mean no need to using config model namespace.

Hope this PR can solve specific model issues

Command:

php artisan Media,\\Applications\\Models\\Media,Models\\Media

Get Model array is

array:2 [
  0 => "\App\Media"
  1 => "\Applications\Models\Media"
  2 => "\App\Models\Media"
]

CasperLaiTW avatar Jun 30 '18 09:06 CasperLaiTW