I`m new to laravel 5.4 so that i need to call these 2 functions in one view. here is the 2 controllers.
public function index()
{
$items = trainingprogramedetails::all()->last();
return view('programesession/index',compact('items'));
}
public function list()
{
$lists = trainingprogramedetails::all();
return view('programesession/index',compact('lists'));
}
Here is my view index.blade.php
<thead>
<th>Name</th>
<th>Data</th>
</thead>
<tbody>
<tr>
<td>Date</td>
<td></td>
</tr>
<tr>
<td>Time</td>
<td></td>
</tr>
<tr>
<td>Venue</td>
<td></td>
</tr>
</tbody>
</table>
<table class="table table-striped">
<thead>
<th>Trainee Programe ID</th>
<th>Presenter Name</th>
<th>Division</th>
<th>Date</th>
</thead>
<tbody>
@foreach($lists as $item)
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
@endforeach
</tbody>
</table>
So that this the error getting here.
Here is my Rout
Route::group(['middleware' => ['web']], function () {
Route::resource('/programelist', 'TrainingProgrameSeassion');
});
Can you please help met to solve this?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2p8L4QH
via IFTTT
Aucun commentaire:
Enregistrer un commentaire