app/Http/Controllers/BranchController.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()
    {
      $branch = new Branch();
      $branch->branch_name=request('branch_name');
     $branch->location=request('location');
 $branch->save();
      return redirect('/branch');
    }
public function store ( ) { $ branch = new Branch ( ) ; $ branch -> branch_name = request ( 'branch_name' ) ; $ branch -> location = request ( 'location' ) ; $ branch -> save ( ) ; return redirect ( '/branch' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .
//Branc h::create(request(['branch_name','location']));