dimanche 3 septembre 2017

grab and display table data in Laravel 5.2

in My Laravel 5.2 application I have tasks table like this

 id      task_name      project_id
    1         aaa               1
    2         hjhkj             2
    3         jhghg             1
    4         jgsdygu           3
    5         gdggfv            2

now I am going to display task names for to relevant each project_id in My index.blade.php file in tasks folder in resource file.

I am using this codes for this

@foreach ($project->tasks as $task)
    <h4><a href="/projects//tasks/"></a></h4>
@endforeach 

now I can seen with tasks name relevant to each project_id. but now I need to click on each task name and display project_id, task id and task name in show.blade.php file witch located in task folder how can do this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire