Ejemplo n.º 1
0
 public function login()
 {
     $data = Input::all();
     $rules = ['phone' => 'required|min:11', 'password' => 'required|min:8'];
     $val = Validator::make($data, $rules);
     if ($val->fails()) {
         return View::make('errors.validation')->with('errors', $val->messages()->toArray());
     }
     $user = User::login($data);
 }