Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Using QueryBuilder apparently.
$users = DB::table('users')->get();
https://laravel.com/docs/5.3/queries
It's probably better to expand the task with specific examples, otherwise it's hard to abstract like that.
It's generally possible to write a boot() in a model that (the content of the boot) will be executed before the rest of the model's code is loaded, but that will be done before the routes are processed, so it's not entirely clear how to pass the second link. And again, it is not clear - why?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question