Пример #1
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy(DestroyRequest $request, $id)
 {
     User::findOrFail($id)->delete();
     return redirect('users/admin')->with('message', 'User destroyed.');
 }
Пример #2
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::create(['name' => 'User Dude', 'email' => '*****@*****.**', 'password' => 'asdf', 'role_id' => 1]);
 }
Пример #3
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }