eloquent - Laravel Clear Model Queries -


i have code not sure if possible more compact or i´m not sure if way should looks type of queries in laravel.

public function getroletransactionnamebyid($id) {      $role_transaction= $this->model->select(             'roles_transactions.id',             'roles.id role_id',              'roles.role_name',              'modules.module_name',             'transactions.transaction_name',              'transactions.transaction_description',             'roles_transactions.transaction_action_id',             'transaction_actions.transaction_action_name',             'roles_transactions.created_at',             'roles_transactions.updated_at')          ->join('roles', 'roles_transactions.role_id', '=', 'roles.id')         ->join('transactions', 'roles_transactions.transaction_id', '=', 'transactions.id')         ->join('transaction_actions', 'roles_transactions.transaction_action_id', '=', 'transaction_actions.id' )         ->leftjoin('modules','transactions.module_id', '=', 'modules.id')          ->where('roles_transactions.id', '=', $id)         ->where('roles_transactions.deleted_at','=', null)          ->orderby('roles.role_name', 'asc')         ->orderby('modules.module_name', 'asc')         ->orderby('transactions.transaction_name', 'asc')          ->get();      return $role_transaction; } 

thank help.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -