Answer the question
In order to leave comments, you need to log in
Using a Model in a Laravel Controller?
How can use App\Model;
you call a model in a controller without being able to? $name=App\Model::find($k)->pluck('name');
This does not work. Or did I write it wrong?
Thank you.
Answer the question
In order to leave comments, you need to log in
It's better to use use.
And so you lost \, because the name is determined from the current App\Http\Controllers namespace,
you need \App\Model
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question