示例#1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param StoreRequest|Request $request
  * @return Response
  */
 public function store(StoreRequest $request)
 {
     $user = $this->user->createWithRoles($request->only('name', 'email', 'password', 'status'), $request->get('roles', []));
     if ($user) {
         flash()->success(trans('users.registration.success', ['name' => $user['name']]));
         if ($request->has('continue')) {
             return redirect()->back();
         }
         return redirect()->route('admin.users.index');
     }
 }