app/Http/Controllers/Api/AccountController.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()
    {
        $accounts = Account::all();
        $accountType = AccountType::all(['id','name']);
        $branches = Branches::all(['id','name']);
        $currency = Currency::all(['id','name']);
        $customers = DB::select("Select 
            customers.id,
            CONCAT(customers.firstname,' ',customers.lastname) as name FROM customers");
        return view('accounts.create',
        [
            '$account' => $accounts, 
            'customers' => $customers,
            'accountType' => $accountType,
            'branches' => $branches,
            'currency' => $currency,
        ]);
    }
public function create ( ) { $ accounts = Account :: all ( ) ; $ accountType = AccountType :: all ( [ 'id' , 'name' ] ) ; $ branches = Branches :: all ( [ 'id' , 'name' ] ) ; $ currency = Currency :: all ( [ 'id' , 'name' ] ) ; $ customers = DB :: select ( " Select 
            customers.id,
            CONCAT(customers.firstname,' ',customers.lastname) as name FROM customers " ) ; return view ( 'accounts.create' , [ '$account' => $ accounts , 'customers' => $ customers , 'accountType' => $ accountType , 'branches' => $ branches , 'currency' => $ currency , ] ) ; }
Show the form for creating a new resource.
Show the form for creating a new resource .