I had already opened a discussion on a similar issue, but I would like to find an alternative and therefore post here.
I have a list of posts within foreach, with lots of details, such as title, description, count of likes, list of comments etc. all thanks to the reports.
I would like clicking on each post to open a modal with exactly all the details of that post.
Can I do all this via the controller?
To give a quick example of what I mean:
I click on the post that calls a controller route
This controller has as a view for example "modal_post.blade.php" where inside there is all the content in modal.
@marcolino922 Do you already have all the information available with the list of posts or do you query only the columns you need? If it's the former you don't need an extra request, if it's the latter (and you want to show the modal on the same page) you would have to do it asynchronous using Livewire or AJAX.
Yes, in my list I see all the details about each post, everything ok. I just wish that clicking on each post would open the post I am calling with all its details.