Here is the code
Route::post('products/search', ['as' => 'search', 'uses' => 'ProductController@search']); Route::controller('products', 'ProductController');
{!! Form::open(['route' => 'search', 'class' => 'form', 'method' => 'post']) !!} {!! Form::text('search') !!} {!! Form::select('ts1', $data1) !!} {!! Form::select('ts2', $data2) !!} {!! Form::select('ts3', $data3) !!} {!! Form::submit('Search', array('class'=>'btn btn-primary')) !!} {!! Form::close() !!}
TokenMismatchException in VerifyCsrfToken.php line 46: in VerifyCsrfToken.php line 46 at VerifyCsrfToken->handle(object(Request), object(Closure)) in VerifyCsrfToken.php line 17 at VerifyCsrfToken->handle(object(Request), object(Closure)) in Pipeline.php line 125 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in ShareErrorsFromSession.php line 55 at ShareErrorsFromSession->handle(object(Request), object(Closure)) in Pipeline.php line 125 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in StartSession.php line 62 at StartSession->handle(object(Request), object(Closure)) in Pipeline.php line 125 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in AddQueuedCookiesToResponse.php line 36 at AddQueuedCookiesToResponse->handle(object(Request), object(Closure)) in Pipeline.php line 125 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in EncryptCookies.php line 40 at EncryptCookies->handle(object(Request), object(Closure)) in Pipeline.php line 125 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in CheckForMaintenanceMode.php line 42 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 125 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) at call_user_func(object(Closure), object(Request)) in Pipeline.php line 101 at Pipeline->then(object(Closure)) in Kernel.php line 108 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 83 at Kernel->handle(object(Request)) in index.php line 53
Had to add use Illuminate\Support\Facades\Session; in my controller
@frocco - i get those errors, in which controller add this "use Illuminate\Support\Facades\Session;" ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community