I'm new on laravel.
I have functions on my model php. I want to use them in controller and send to view.
This is my example function.
public function select()
{
$users = DB::table('user')->get();
}
now I need to use this on controller and view.
In codeigniter I handle it like this:
$data['content'] = $this->model->select();
$this->load->view('admin/users', $data);
in codeigniter we first load model then we call its one of its method and then we pass processed data to view . what is counter part of this in laravel 5
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire