Files
faveo/database/seeds/UserSeeder.php
Shift 74bd29e1ee Apply Laravel coding style
Shift automatically applies the Laravel coding style - which uses the PSR-12 coding style as a base with some minor additions.

You may customize the code style applied by configuring [Pint](https://laravel.com/docs/pint), [PHP CS Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer), or [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for your project root.

For more information on customizing the code style applied by Shift, [watch this short video](https://laravelshift.com/videos/shift-code-style).
2023-01-07 19:53:40 +00:00

32 lines
691 B
PHP

<?php
use App\User;
use Illuminate\Database\Seeder;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// creating an user
$str = 'demopass';
$password = \Hash::make($str);
$user = User::create([
'first_name' => 'Demo',
'last_name' => 'Admin',
'email' => null,
'user_name' => 'demo_admin',
'password' => $password,
'assign_group' => 1,
'primary_dpt' => 1,
'active' => 1,
'role' => 'admin',
]);
// checking if the user have been created
}
}