I have a view defined in the "admin" subdirectory, which is an editing form. On submission, this is transmitted to the controller with the following code:
class ThisSiteController extends Controller
{
public function updateSite(Request $request)
{
$thissite = DB::table('this_site')->where('id',1)->get();
$thissite->headline = $request->headline;
$thissite->save();
return view('admin.editfront')->with('site', $thissite);
};
}
It updates one OK header, but I always get
NotFoundHttpException in RouteCollection.php line 161:
Although the route that calls the edit (and works fine):
Route::get('/admin/editfront', function() {
$thissite = DB::table('this_site')->where('id',1)->get();
return view('admin.editfront')->with('site', $thissite);
});
source
share