laravel tinker add user

Solutions on MaxInterview for laravel tinker add user by the best coders in the world

showing results for - "laravel tinker add user"
Kamelia
10 Jan 2018
1$user = new App\User();
2$user->password = Hash::make('the-password-of-choice');
3$user->email = 'the-email@example.com';
4$user->name = 'My Name';
5$user->save();
6
Wassim
27 Oct 2016
11) php artisan tinker
2  
32) >>> User::create(["name"=> "laravel", "email"=>"laravel@tinker.com", "password"=>bcrypt("secret")]);
4=> App\Models\User {#4290
5   name: "laravel",
6   email: "laravel@tinker.com",
7   updated_at: "2021-04-22 08:23:28",
8   created_at: "2021-04-22 08:23:28",
9   id: 1,
10  }
11>>> 
12