/** * 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.'); }
/** * Run the database seeds. * * @return void */ public function run() { User::create(['name' => 'User Dude', 'email' => '*****@*****.**', 'password' => 'asdf', 'role_id' => 1]); }
/** * 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'])]); }