Hi guys i am not able to see what am doing wrong even after doing research. Please assist. i am getting a NotFoundHttpException in Controller.php. Method not found in controller error
public function anyData()
{
$stoves = Stove::select(['id','stoveno', 'refno', 'manufactuerdate', 'created_at']);
return Datatables::of($stoves)
->addColumn('action', function ($stoves) {
return '<a href="stove/'.$stoves->stoveno.'" class="btn btn-invert"><i class="glyphicon glyphicon-edit"></i> History</a>';
})
->editColumn('stoveno', '{{$stoveno}}')
->make(true);
}
public function show($id)
{
$stove = Stove::findorFail($id);
$field = Field::findorFail($id);
//$beneficiary=Beneficiary::find($id);
return view('stoves.view', compact('stove', 'field'));
}
My route looks like
Route::controller('stove', 'StoveController', [
'anyData' => 'stove.data',
'getIndex' => 'stove',]);
Route::get('newstove', 'StoveController@addData');
Route::post('newstove', 'StoveController@store');
Route::get('stove/{id}', 'StoveController@show');
Thanks i appreciate
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire