3

Do we really need extra component to build HTML elements when we can do it with simple html tags?

{!! Form::open(['action' => 'Controller@method']) !!}
...
{!! Form::close() !!}

is equivalent with

<form action="{{url('Controller@method')}}">
...
</form>

Form::label('email', 'E-Mail Address', ['class' => 'awesome']);

is equivalent with

<label class='awesome' name='email'> E-Mail Address</label>

etc...

Are there things we can not achieve using the regular html tags? And if so, Is it ok to use mixed? (html tags and laravelcollective elemnts)

u_mulder
  • 54,101
  • 5
  • 48
  • 64
Minilik
  • 171
  • 11

1 Answers1

5

If you don't see a benefit for yourself then you probably don't need it.

I found myself using it less and less and then eventually just stopped pulling it in altogether.

I think Taylor himself must have come to the same conclusion as otherwise, it would still be in Laravel core rather than a separate package.

Without a doubt, Laravel is one of the top names on the market and blade templating is indeed a good template engine.

Here are some of the reasons why you should use Laravel Collective

  • When you open a form you can give a route to it.

  • The method and the action are defined by blade based on the given
    route.

  • With blade you can create macro's and view composers.

  • Blade is not realy slow because laravel cache the compiled views.

  • With blade you can extend and include views which is more DRY(Don't
    Repeat Yourself) Blade can automatically escape you're data with
    {{{$var}}}.

  • If you've to write a multi-language application blade and laravel
    comes with easy methods to do achieve this.

Reference from comments in the question:

Laravel Form methods VS traditional coding

Sagar Ahuja
  • 726
  • 6
  • 23
  • I strongly agree with : "I laravelcollective must have come to the same conclusion as otherwise, it would still be in Laravel core rather than a separate package." – Minilik Jun 20 '18 at 15:23