Answer the question
In order to leave comments, you need to log in
Where to write Fluent class code in Laravel?
So it goes.
There is documentation , and this section talks about Fluent.
And stupidly inserting code that is not clear at all where to write, where to use.
Damn documentation.
Where to prescribe all these pieces of code?
Answer the question
In order to leave comments, you need to log in
The fluent interface is a chain of methods in php and is used to more conveniently write requests to php, which is then used.
That is, instead we write it in the form'SELECT name FROM table WHERE 1 = 1'
DB::table('table')->select('name')->where('1', '=', 1);
I'm not a telepath, but it looks like you're going the wrong way.
Look at https://laravel.ru/docs/v5/eloquent
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question