 0b263803ad
			
		
	
	0b263803ad
	
	
	
		
			
			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).
		
			
				
	
	
		
			35 lines
		
	
	
		
			756 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			756 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace Database\Seeders;
 | |
| 
 | |
| use App\User;
 | |
| use Illuminate\Database\Seeder;
 | |
| use Illuminate\Support\Facades\Hash;
 | |
| 
 | |
| 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
 | |
|     }
 | |
| }
 |