B
B
BonBon Slick2016-11-15 12:24:47
Laravel
BonBon Slick, 2016-11-15 12:24:47

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 --seedwas 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

Stupor here:
<?php

use Illuminate\Database\Seeder;

class CategorySeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
    	factory(App\Category::class, 55)->create();
    }
}
// раньше это работало, там есть класс, и модель его.

Factory:
<?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),

  ];
});

Here is the class/model header:
namespace App;

use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;

class Category extends Model
{

As I understand it, the problem is with some injections. The question is, why did it stop working if I didn't give anything? How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BonBon Slick, 2016-11-15
@BonBonSlick

All found the problem. use Laravel\Scout\Searchable;forgot to inject into app.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question