Answer the question
In order to leave comments, you need to log in
Unresolvable dependency resolving [Parameter #0 [ $app ]] in class Illum inate\Support\Manager came from nothing?
Laravel 5.3 This is the case, until last weekend the command php artisan migrate:refresh --seed
was working fine. Migrations were created and filled with factories. Didn't do anything over the weekend, now run it, gives this error:
[Illuminate\Contracts\Container\BindingResolutionException]
Unresolvable dependency resolving [Parameter #0 [ <required> $app ]] in class Illum
inate\Support\Manager
<?php
use Illuminate\Database\Seeder;
class CategorySeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
factory(App\Category::class, 55)->create();
}
}
// раньше это работало, там есть класс, и модель его.
<?php
$factory->define(App\Category::class, function (Faker\Generator $faker)
{
return [
'parent_id' => mt_rand(0, 10),
'name' => $faker->company,
'slug' => str_random(25),
'description' => $faker->text(100),
];
});
namespace App;
use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;
class Category extends Model
{
Answer the question
In order to leave comments, you need to log in
All found the problem. use Laravel\Scout\Searchable;
forgot to inject into app.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question