router stopped working after installing seeder

Viewed 25

I installed seeder, and now web.php isn't working. Meaning- I can comment things out, change things around, etc., but I'll still always receive the laravel welcome page. I'm putting here my seeder code, maybe the problem is rooted there- but the code the way it is now was the only way I was able to get 'php artisan db:seed' to work.

UserSeeder:

<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('users')->insert([
            'name'=> 'Admin',
            'email'=> 'admin@medisonmedia.com',
            'password'=> bcrypt('Aa123456')
        ]);
    }
}

DatabaseSeeder:

<?php

use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Run the database seeders.
     *
     * @return void
     */
    // public function run()
    // {
    //     $this->call(UserSeeder::class);
    // }
    public function run()
 {
     \App\Models\User::factory(1)->create();
}
}
0 Answers
Related