3
After several months without using Laravel, I now return with this version 5. It may sound silly, but I’m having trouble creating a simple form. Apparently Illumiante/html is not coming by default in the framework, so it is necessary to make some modifications.
I added the following lines to each file:
Composer.json
"illuminate/html": "5.0.*@dev"
config/app.php
'Illuminate\View\ViewServiceProvider',
'Illuminate\Html\HtmlServiceProvider',
'Form'=> 'Illuminate\Html\FormFacade',
'HTML'=> 'Illuminate\Html\HtmlFacade',
my view
{{ Form::open(array('action' => 'HomeController@gerarPdf'))}}
{{ Form::text('name', 'name') }}
{{ Form::password('password') }}
{{ Form::submit('Send') }}
{{ Form::close() }}
Homecontroller
public function gerarPdf() {
return 'ola mundo';
}
Error message
OBS
I’ve already given Poser update and the method has already been created in the controller.
Laravel 5
? He’s not in the alpha version?– Wallace Maxters
@Wallacemaxters If it is, I don’t know. Through the Composer installation command (provided by the Laravel website) I got the 5th version.
– Allan Ramos
The stable version of Laravel is the 5.0.6
– Lucio Rubens
@luciorubeens Yes, my version is 5.0.6.
– Allan Ramos