Reputation: 1307
What is the right way to use the classes HTML and FORM, from illuminate of Laravel 4 in Laravel 5?
In Laravel 4 I can use like this:
{{ Form::open(array('url' => 'foo/bar')) }}
// Anything
{{ Form::close() }}
I can add inputs as follows:
{{ Form::text('username'); }}
{{ Form::text('email', '[email protected]'); }}
{{ Form::password('password'); }}
{{ Form::email($name, $value = null, $attributes = array()); }}
{{ Form::file($name, $attributes = array()); }}
How could I do the same thing in Laravel 5?
Upvotes: 8
Views: 3135
Reputation: 219910
First install the package from Laravel Collective.
Then, when you use it, be sure to use Laravel 5's new raw blade tags:
{!! Form::text('username') !!}
Upvotes: 9