daily pastebin goal
20%
SHARE
TWEET

Untitled

a guest Dec 6th, 2016 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Start Tinker
  2. php artisan tinker
  3.  
  4. # View all users
  5. App\Models\User::all();
  6.  
  7. # Delete user by email address
  8. App\Models\User::where('email', 'name@email.com')->first()->delete();
  9.  
  10. # Create a new user
  11. $user = new App\Models\User;
  12. $user->name = "User Name";
  13. $user->email = "user@email.com";
  14. $user->password = \Hash::make('password');
  15. $user->save();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top