I am trying to send a post request to a Laravel project using Postman, but I get a "419 unknown status" response
routes\web.php:
Route::post('/myaction', 'MymodelController@myaction');
app\Http\Controllers\MymodelController.php:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Mymodel;
class MymodelController extends Controller
{
function myaction()
{
return redirect('/');
}
}
Why does this happen?
The same error appears independently of the content of myaction()
csrf
? No, how can I send it through Postman? – Irini Koutaki