Home>

I'm new to programming.
Code to insert data in Laravel with php artisan db: seed --class = FoldersTableSeeder
I went there, but Database \ Seeders \ FoldersTableSeeder still exists
Regardless, Target class [Database \ Seeders \ FoldersTableSeeder] does not exist.
I am in trouble because I get the error.
I also tried composer dump-autoload but it didn't work.
Thanks for your cooperation.

PS C: \ Users \ kazmu \ Downloads \ laravelapp>php artisan db: seed --class = FoldersTableSeeder
   Illuminate \ Contracts \ Container \ BindingResolutionException
  Target class [Database \ Seeders \ FoldersTableSeeder] does not exist.
  at C: \ Users \ kazmu \ Downloads \ laravelapp \ vendor \ laravel \ framework \ src \ Illuminate \ Container \ Container.php: 832
    828▕
    829 ▕ try {
    830 ▕ $reflector = new ReflectionClass ($concrete);
    831 ▕} catch (ReflectionException $e) {
  ➜ 832 ▕ throw new BindingResolutionException ("Target class [$concrete] does not exist.", 0, $e);
    833 ▕}
    834 ▕
    835 ▕ // If the type is not instantiable, the developer is attempting to resolve
    836 ▕ // an abstract type such as an Interface or Abstract Class and there is
  1 C: \ Users \ kazmu \ Downloads \ laravelapp \ vendor \ laravel \ framework \ src \ Illuminate \ Container \ Container.php: 830
      ReflectionException :: ("Class Database \ Seeders \ FoldersTableSeeder does not exist")
  2 C: \ Users \ kazmu \ Downloads \ laravelapp \ vendor \ laravel \ framework \ src \ Illuminate \ Container \ Container.php: 830
      ReflectionClass :: __ construct ("Database \ Seeders \ FoldersTableSeeder")
Corresponding source code
(Database \ Seeders \ FoldersTableSeeder)
<? php
use Carbon \ Carbon;
use Illuminate \ Database \ Seeder;
use Illuminate \ Support \ Facades \ DB;

class FoldersTableSeeder extends Seeder
{
   /**
     * Run the database seeds.
     *
     * @return void
     * /
    public function run ()
    {
        $titles = ['Private','Work','Travel'];
        foreach ($titles as $title) {
            DB :: table ('folders')->insert ([
                'title' =>$title,
                'created_at' =>Carbon :: now (),
                'updated_at' =>Carbon :: now (),
            ]);
        }
    }
}