예제 #1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $data = $request->except('_method', '_token');
     $data['password'] = md5(md5($data['password']));
     $data['reg_time'] = date('Y-m-d H:m:i', time());
     if (Models\Manager::create($data)) {
         return redirect(action('Admin\\ManagerController@index'));
     } else {
         return redirect(action('Admin\\ManagerController@create'))->withInput()->withErrors('添加失败');
     }
 }