samedi 23 juillet 2016

How to use relative url in Laravel 5 forms?

In my view, I have

{!! Form::open(['url'=>'/foo/bar']) !!}

This generates the following html

<form method="POST" action="http://localhost/foo/bar" accept-charset="UTF-8">
<input name="_token" value="5GnCAyo2v076FfvnF51jWbiddCdLX138TMxQl83c" type="hidden">
</form>

The generated action is an absolute URL. How can I use Form::open() to create a relative URL? I do not want action="http://localhost/foo/bar", instead I want action="/foo/bar".



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/29S0Xbi
via IFTTT

Aucun commentaire:

Enregistrer un commentaire