示例#1
0
 /**
  * Store a newly created resource in storage.
  * @param Request $request
  * @return mixed
  */
 public function store(Request $request)
 {
     if ($this->users->create($request->all())) {
         return redirect()->route('admin.auth.user.index');
     }
     return Redirect::back()->withInput()->withErrors('保存失败!');
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \App\Http\Requests\API\v1\UserRequest $request
  * @param  \App\Contracts\Repositories\UserRepository $userRepo
  * @return \Illuminate\Http\Response
  */
 public function store(UserRequest $request, UserRepository $userRepo)
 {
     $userRepo->create($request);
     return $this->response->created();
 }