Posts by Luiz Lapetina • 11 points
2 posts
-
0
votes2
answers37
viewsA: How to pass method objects that are in different controllers in Laravel?
If in your book Migration you created the book_id as foreign key referencing the books table, just vc create the relationship in the batch template and use the relationship anywhere in the system…
-
1
votes2
answers131
viewsA: How to access belongsTo and hasOne in the view? - Relationship 1 - 1 bidirectional
You don’t need to call both relationships, just call one I would do so: public function index(){ $users = User::with(['address'])->->paginate(5); return view('adress.index', ['users' =>…