I am new to Laravel and I am facing a weird issue. In the routes I am calling a function through POST and GET method.
GET returns data but POST doesn't. Here is my simple code:
For POST
Route::post('register', function() {
echo 'we are here';
});
For GET:
Route::get('register', function() {
echo 'we are here';
});
Please help. Thank you.
You need to include a CSRF token on every request (except GET).
https://laravel.com/docs/5.2/routing#csrf-protection
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With