Lugi
182
3
Tips

RESTful forms

Posted 3 years ago by Lugi

I watched some videos and now I'm little confused :-).

Which one is the best way and why - url, action or route ?

{!! Form::model($article, ['method' => 'PATCH', 'action' => ['ArticlesController@update', $article->id]]) !!}
{!! Form::model($article, ['method' => 'PATCH', 'url' => ['articles/' . $article->id]]) !!}
{!! Form::model($article, ['method' => 'PATCH', 'route' => ['articles.update', $article->id]]) !!}

Thanks

Please sign in or create an account to participate in this conversation.