为什么我的Laravel工厂无法找到我的型号?

I have created a Business model using artisan make:model command, a model factory and a seed method. When running my seed method I get the following error:

InvalidArgumentException Unable to locate factory with name [default] [App\Business].

Can someone tell me what I'm doing wrong?

Business model:

namespace App;
use Illuminate\Database\Eloquent\Model;

class Business extends Model
{
    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'name'
    ];

    public function resources()
    {
        return $this->hasMany('App\Resource');
    }

}

Business Factory

use Faker\Generator as Faker;

$factory->define(Business::class, function (Faker $faker) {
    return [
        'name' => $faker->company,
    ];
});

Seeder Method

$business = factory(App\Business::class, 50)
                   ->create()
                   ->each(function ($u) {
                        $u->resources()->save(factory(App\Resource::class)->make());
                    });

Please, try to composer dump-autoload

Sometimes, it helps in such situations.

And make sure that when you declare such factory: $factory->define(Business::class,... your Business class is correctly imported, or consider changing it to App\Business.