Official documentation for Forms & Html for The Laravel/Lumen Framework can be found at the LaravelCollective website.
composer require vluzrmos/collective-html
On your bootstrap/app.php
:
$app->register('Collective\Html\HtmlServiceProvider');
class_alias('Collective\Html\HtmlFacade', 'Html');
class_alias('Collective\Html\FormFacade', 'Form');
And remember to enable de facades, just uncomment that line:
$app->withFacades()
If you want to automatically inject the $html
and $form
variables on all your Blade's View:
$app->register('Collective\Html\InjectVarsServiceProvider');
And now you will not need the facades anymore, just that:
{!! $form->open() !!}
//...
{!! $html->asset() !!}
That package is just a free modification of LaravelCollective/Html to work with Lumen Framework.