Answer the question
In order to leave comments, you need to log in
How to correctly pass a model property?
There is a method that, judging by the result, transfers existing records from the database to the view:
public function index(Request $request)
{
$text = Text::orderBy('id','DESC')->paginate(5);
return view('text.index',compact('texts'))
->with('i', ($request->input('page', 1) - 1) * 5);
}
Text
? User
, each Text
has one User'a
, and you need to display a Text
property for each instance User'a
- its name.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question