source:
database/seeders/UsersTableSeeder.php@
120759b
Last change on this file since 120759b was 120759b, checked in by , 3 years ago | |
---|---|
|
|
File size: 739 bytes |
Rev | Line | |
---|---|---|
[7304c7f] | 1 | <?php |
2 | ||
3 | namespace Database\Seeders; | |
4 | ||
[120759b] | 5 | use App\Models\User; |
[7304c7f] | 6 | use Carbon\Carbon; |
7 | use Illuminate\Database\Seeder; | |
8 | ||
9 | class UsersTableSeeder extends Seeder | |
10 | { | |
11 | /** | |
12 | * Run the database seeds. | |
13 | * | |
14 | * @return void | |
15 | */ | |
16 | public function run() | |
17 | { | |
18 | \DB::table("users")->insert([ | |
19 | "name" => "Berat", | |
20 | "surname" => "Kjufliju", | |
21 | "username" => "beratk", | |
22 | "password" => bcrypt("123456"), | |
23 | "email" => "kufliju@gmail.com", | |
24 | "mobile_number" => "+38971201239", | |
25 | "role_id" => 1, | |
26 | "is_active" => true, | |
27 | "is_confirmed" => true, | |
28 | "created_at" => Carbon::now() | |
29 | ]); | |
30 | ||
[120759b] | 31 | User::factory()->count(20)->create(); |
[194a359] | 32 | |
[7304c7f] | 33 | } |
34 | } |
Note:
See TracBrowser
for help on using the repository browser.