laravel 5 - issue in update controller -


  1. i got issue while updateing notfoundhttpexception in routecollection.php line 161: in routecollection.php line 161 @ routecollection->match(object(request)) in router.php line 821 @ router->findroute(object(request)) in router.php line 691 @ router->dispatchtoroute(object(request)) in router.php line 675
    @ router->dispatch(object(request)) in kernel.php line 246 @ kernel->illuminate\foundation\http{closure}(object(request)) @ call_user_func(object(closure), object(request)) in pipeline.php line 52 @ pipeline->illuminate\routing{closure}(object(request)) in checkformaintenancemode.php line 44 @ checkformaintenancemode->handle(object(request), object(closure))
    @ call_user_func_array(array(object(checkformaintenancemode), 'handle'), array(object(request), object(closure))) in pipeline.php line 136 @ pipeline->illuminate\pipeline{closure}(object(request)) @ call_user_func(object(closure), object(request)) in pipeline.php line 32 @ pipeline->illuminate\routing{closure}(object(request)) @ call_user_func(object(closure), object(request)) in pipeline.php line 103 @ pipeline->then(object(closure)) in kernel.php line 132 @ kernel->sendrequestthroughrouter(object(request)) in kernel.php line 99 @ kernel->handle(object(request)) in index.php line 54

for given issue here 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"> {{ form::label('user', 'user name:', ['class' => 'control-label']) }} {{ form::text('user', null, ['class' => 'form-control']) }}     </div> {!! form::submit('update', ['class' => 'btn btn-primary']) !!} {!! form::close() !!} 

here route

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

thanks every 1 helping me out. uses , work fine. again!!

 {!! form::model($website, ['method' => 'patch', 'route' => ['websites.update', $website->id]]) !!}`         .         .         .           route::any('websites/{id}/update',             ['as' => 'websites.update', 'uses' => 'websitecontroller@update']         ); 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -