mardi 28 juin 2016

issue in update controller

  1. i got the issue while updateing NotFoundHttpException in RouteCollection.php line 161: in RouteCollection.php line 161 at RouteCollection->match(object(Request)) in Router.php line 821 at Router->findRoute(object(Request)) in Router.php line 691 at Router->dispatchToRoute(object(Request)) in Router.php line 675
    at Router->dispatch(object(Request)) in Kernel.php line 246 at Kernel->Illuminate\Foundation\Http{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 52 at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 44 at CheckForMaintenanceMode->handle(object(Request), object(Closure))
    at call_user_func_array(array(object(CheckForMaintenanceMode), 'handle'), array(object(Request), object(Closure))) in Pipeline.php line 136 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 32 at Pipeline->Illuminate\Routing{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 103 at Pipeline->then(object(Closure)) in Kernel.php line 132 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 99 at Kernel->handle(object(Request)) in index.php line 54

For the given issue Here is my Controller

public function update(Request $request ,$id){

        print_r($request);
        return redirect()->back();
    }

View

{!! Form::model($website, ['method' => 'PATCH   ', 'route' => ['websites.update', $website->id]]) !!}`
<div class="form-group">


    </div>
{!! Form::submit('Update', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}

Here My route

  Route::post('websites/{id}/update',
    ['as' => 'websites.update', 'uses' => 'WebsiteController@update']
);



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire