Masum billah
Masum billah

Reputation: 982

How to define hyperlink in Laravel Blade template?

There is a button,which will redirect to a new page after being clicked.

I want to define a hyperlink for this in laravel blade template.

{!! Form::button('<span class="fa fa-arrow-circle-right"></span> Start', 
        array('class' => 'btn btn-next next-step pull-right')) 
        !!}

Upvotes: 2

Views: 372

Answers (1)

Alexey Mezenin
Alexey Mezenin

Reputation: 163748

Wrap your button with a form:

<form action="http://example.com">
    // button code
</form>

Or:

{!! Form::open(['url' => 'http://example.com']) !!}
    // button code
{!! Form::close() !!}

{!! Form::open(['route' => 'route.name']) !!}
    // button code
{!! Form::close() !!}

{!! Form::open(['action' => 'Controller@action']) !!}
    // button code
{!! Form::close() !!}

Upvotes: 2

Related Questions