1

Consider that i have a contact form in my contact page,

So why should i use something like laravel collective that is a form builder.

I can simply write down my html codes in contact view like this:

<input class="form-control" name="company" type="text">

instead of this :

{{ Form::text('company', null, ['class' => 'form-control']) }}

What is the benefit?

Amin
  • 413
  • 6
  • 12
  • I'll refer you here: https://stackoverflow.com/questions/25969746/laravel-form-methods-vs-traditional-coding – admcfajn Sep 02 '17 at 03:26

1 Answers1

0
  • Cleaner syntax. Compare for example a traditional HTML select vs using Form::select('name', $array).
  • Integrated CSRF protection.
  • Integrated URLs to named routes, actions and RESTful controllers of your application. If use routes in your form URL and you cange a route URL all your models will still work.
  • Form Model Binding to populate form with data from your models.
  • Automatic form fields population with flash (old) input.

You can also refer to the laravel Documentation Laravel Doc for form Builder

Rohit shah
  • 833
  • 4
  • 15