app/Http/Controllers/BranchesController.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(BranchRequest $request)
    {
       $branchCreate = Branches::create($request->all());
       return redirect()->route('branches.edit', [
            'branch' => $branchCreate->id
        ])->with([
            'color'=>'alert-success',
            'message' => 'Centro de Custo Cadastrado com sucesso!'
        ]);
    }
public function store ( BranchRequest $ request ) { $ branchCreate = Branches :: create ( $ request -> all ( ) ) ; return redirect ( ) -> route ( 'branches.edit' , [ 'branch' => $ branchCreate -> id ] ) -> with ( [ 'color' => 'alert-success' , 'message' => 'Centro de Custo Cadastrado com sucesso!' ] ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .