我很困惑为什么我的删除无效。
我的route
Route::get('/delete-works/{id}/', [
'uses' => 'WorksController@getDeleteWorks',
'as' => 'Works.delete',
'middleware' => 'auth'
]);
我的controller
public function getDeleteWorks(Request $request, $id)
{
$class_id = $request->get('class_id');
$works = assainments::where('id', $id)->first();
$works->delete();
Flash::success('Successfuly deleted!');
return redirect(route('works',['class_id'=>$class_id]));
}
我的view link
<a href="{{ route('Works.delete', ['class_id'=>$class_id,'id' => $works->id]) }}" ><i class="fa fa-trash"></i></a>
现在它显示空白页面。不显示任何error
。