I am trying to use seeder following a tutorial but I am always getting this error
Illuminate\Contracts\Container\BindingResolutionException
Target class [HotelSeeder] does not exist.
when I run this command :
php artisan db:seed
I have in database\seeders\DatabaseSeeder.php add this line
$this->call(\HotelSeeder::class);
into the up function
and in database\seeders\HotelSeeder.php
<?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class HotelSeeder extends Seeder
{
**I am using latest version laravel 8 and phpstorm **
I have tried lot of solutions like composer dump-autoload and adding namespace to the seeder function but none of them has worked. Thanks in advance