I am using Laravel 5.0
I have a method in MyController
public function myMethod($id) {
dd($id);
}
The routes.php file
Route::post('path1/{id}/path2', 'MyController@myMethod');
Route::resource('path1', 'MyController');
In the view file, I am calling the method through a form on submit
{!! Form::open(['action' => ['MyController@myMethod', $myObject->id]]) !!}
Now the problem is, every time I click on Submit I get a 404 error. The URL in the address bar changes to path1/1/path2 as expected, but I get 404.
Where am I going wrong?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1U0C6A5
via IFTTT
Aucun commentaire:
Enregistrer un commentaire