app/Http/Controllers/AccountController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        $accounts = DB::select("SELECT 
        CONCAT(customers.firstname,' ',customers.lastname) as account_holder,
        branches.name as branch_name,
        currencies.name as currency_name,
        account_types.name as account_type_name,
        accounts.account_balance,
        accounts.account_number,
        accounts.id
        FROM `accounts`
        INNER JOIN customers ON accounts.customer_id = customers.id
        INNER JOIN branches ON accounts.branch_id = branches.id
        INNER JOIN currencies ON accounts.currency_id = currencies.id
        INNER JOIN account_types ON accounts.account_type_id = account_types.id");
        return view('accounts.index',['accounts' => $accounts]);
    }
public function index ( ) { $ accounts = DB :: select ( " SELECT 
        CONCAT(customers.firstname,' ',customers.lastname) as account_holder,
        branches.name as branch_name,
        currencies.name as currency_name,
        account_types.name as account_type_name,
        accounts.account_balance,
        accounts.account_number,
        accounts.id
        FROM `accounts`
        INNER JOIN customers ON accounts.customer_id = customers.id
        INNER JOIN branches ON accounts.branch_id = branches.id
        INNER JOIN currencies ON accounts.currency_id = currencies.id
        INNER JOIN account_types ON accounts.account_type_id = account_types.id " ) ; return view ( 'accounts.index' , [ 'accounts' => $ accounts ] ) ; }
Display a listing of the resource.
Display a listing of the resource .