app/Http/Controllers/UserController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(UserRequest $request)
    {
        $userCreate = User::create($request->all());
        return redirect()->route('users.edit', [
            'user' => $userCreate->id
        ])->with([
            'color'=>'alert-success',
            'message' => 'Usuario cadastrado com sucesso.'
        ]);
    }
public function store ( UserRequest $ request ) { $ userCreate = User :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'users.edit' , [ 'user' => $ userCreate -> id ] ) -> with ( [ 'color' => 'alert-success' , 'message' => 'Usuario cadastrado com sucesso.' ] ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .