【发布时间】:2014-05-02 14:11:40
【问题描述】:
我是 laravel 的新手。我正在尝试链接到另一个页面。我有页面索引,想去 desc 显示有关在索引页面中选择的车辆的信息。 问题是它显示错误:
Symfony\Component\HttpKernel\Exception\NotFoundHttpException
index.blade.php
@foreach ($cars as $car)
<tr>
<td>
{{link_to_action('CarController@show', $car->Description, $car->id)}}</td>
{{ Form::open(array('action' => 'CarController@show', $car->id)) }}
{{ Form::close() }}
<td>{{ $car->License }}</td>
<td>{{ $car->Milage }}</td>
<td>{{ $car->Make }}</td>
<td>{{ $car->status }}</td>
</tr>
@endforeach
routes.php
Route::resource('/', 'CarController');
Route::resource('create', 'DataController');
Route::post('desc', array('uses' => 'CarController@show'));
Route::post('create', array('uses' => 'CarController@create', 'uses' => 'DataController@index'));
Route::post('update', array('uses' => 'CarController@update'));
Route::post('store', array('store' => 'CarController@store'));
【问题讨论】: