samedi 27 octobre 2018

access referenced images model from projects model in laravel

i have made 2 models:

Project model

Image model

i want to display image gallery for each project, i have made a foreign key in images table that references projects table and i want to access all the images for a specific project and display it in mi view

here are the pictures of mi db tables:

Images table

Project table

controller code:

ProjekatController image

view code



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2qeYWvU
via IFTTT

Aucun commentaire:

Enregistrer un commentaire