Answer the question
In order to leave comments, you need to log in
How does the POST method work in Laravel routes?
Hello.
I just started learning Laravel (this is my first framework in principle) and almost immediately ran into a difficulty.
I'm creating a simple form with one text field and a submit button (Without Laravel's help) in a test.php view file that is called from the "MyFirstController" controller.
In the routes.php file I write (in the form: action="act_form"):
Route::post('test/act_form', function()
{
return "Форма обработана!";
});
<?php
Route::get('/', function()
{
return "Hello!";
});
Route::get('test', '[email protected]');
Route::post('test/act_form', function()
{
return "Форма обработана!";
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question