Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using HTML & Form helpers in Laravel 5

Tags:

php

laravel

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?

like image 538
Caio Ladislau Avatar asked Apr 30 '15 02:04

Caio Ladislau


People also ask

What is HTML used for?

HTML (HyperText Markup Language) is the code that is used to structure a web page and its content. For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and data tables.

Is HTML good for beginners?

As fundamental web development languages HTML and CSS are a great way to get started with development. This is because these languages offer simple sets of rules that define how to code and are easy to learn.


1 Answers

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') !!}
like image 109
Joseph Silber Avatar answered Oct 21 '22 11:10

Joseph Silber