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(Request $request)
    {
        $branch = Branches::create([
            'name' => $request->input('name'),
            'address' => $request->input('address'),
            'phone_number' => $request->input('phone_number'),
            'created_at' => date('Y-m-d H:i:s'),
            'created_by' => 1,
            'updated_by' => 1,
        ]);
        return redirect()->route("branches.index");
    }
public function store ( Request $ request ) { $ branch = Branches :: create ( [ 'name' => $ request -> input ( 'name' ) , 'address' => $ request -> input ( 'address' ) , 'phone_number' => $ request -> input ( 'phone_number' ) , 'created_at' => date ( 'Y-m-d H:i:s' ) , 'created_by' => 1 , 'updated_by' => 1 , ] ) ; return redirect ( ) -> route ( " branches.index " ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .