public function getOrm() { $users = User::first(); dd($users->last_name); }
/** * Create a new user instance after a valid registration. * * @param array $data * @return User */ public function create(array $data) { return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]); }
/** * Remove the specified resource from storage. * * @param int $id * @return Response */ public function destroy($id, Request $request) { $user = User::findOrFail($id); $user->delete(); $message = 'El usuario: ' . $user->full_name . ' fue eliminado de los registros'; if ($request->ajax()) { //return $message; return response()->json(['message' => $message, 'id' => $user->id]); } \Session::flash('message', $message); //Redireccion a la lista de usuarios return redirect()->route('admin.users.index'); }