Issues (28)

database/seeds/UsersTableSeeder.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Wingsline\Blog\Database\Seeds;
4
5
use App\User;
0 ignored issues
show
The type App\User was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Illuminate\Database\Seeder;
7
use Illuminate\Support\Facades\DB;
8
9
class UsersTableSeeder extends Seeder
10
{
11
    /**
12
     * Run the database seeds.
13
     */
14
    public function run()
15
    {
16
        /** @var User $user */
17
        $user = config('auth.providers.users.model');
18
        if (! DB::table((new User)->getTable())->where('email', '[email protected]')->exists()) {
19
            $user::create([
20
                'name' => 'Administrator',
21
                'email' => '[email protected]',
22
                'password' => bcrypt('admin123'),
23
            ]);
24
        }
25
    }
26
}
27