jmarrdiaz
11/29/2016 - 3:53 PM

Mini tutorial #Tinker. Crea usuarios desde la consola

Mini tutorial #Tinker. Crea usuarios desde la consola

Ej: 
>>> $user = new App\User;
=> <App\User #000000000cd4b36c000000004678b206> {}

>>> $user->name = 'jeff';
=> "jeff"
>>> $user->email = 'jeffer.8a@gmail.com';
=> "jeffer.8a@gmail.com"
>>> $user->password = Hash::make('12345');
=> "$2y$10$VKisE35ASiyLXnZefqvjN..1vVa5wvSkgo6ou5FJwuzYfepUDB/Ku"

>>> $user->save();
=> true
>>>

Articulo completo: https://styde.net/tinker-consola-de-comandos-en-laravel/