I'm extending a blade layout in Laravel. In master page, I defined a html form, and I want set action url of form in child page.
Master:
@section('left')
<form method="post" action="@yield('action')">
@show
</form>
Child:
@section('left')
@parent
@section('action', "")
<button name="ok" class="btn-link">register</button>
@stop
with this code, form action sets as below:
<form action="<?php echo e(URL::route('contact')); ?>" method="post">
<button class="btn-link" name="ok">register</button>
</form>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire