app/Http/Controllers/OrdersController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create(Customer $customer, Branch $branch = null)
    {
        $selectedBranch = $branch;
        if(!$branch== null){
            $selectedBranch = $branch;
        }
       $branches =  Branch::all();
        return view('orders.create',compact('branches','selectedBranch','customer'));
    }
public function create ( Customer $ customer , Branch $ branch = null ) { $ selectedBranch = $ branch ; if ( ! $ branch == null ) { $ selectedBranch = $ branch ; } $ branches = Branch :: all ( ) ; return view ( 'orders.create' , compact ( 'branches' , 'selectedBranch' , 'customer' ) ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .