I am developing a blog as a custom package for Laravel 5.3.
So far I have got the routes, controller, models and migrations working.
I am now working on the CRUD. For the forms I thought I could use this: https://laravelcollective.com/docs/5.3/html
UPDATE
I have installed the package with composer. The dependency is in the composer.json file. The files are in my package's vendor folder. I have also tried to run
composer dump-autoload -o
From my composer.json
"require": {
"laravelcollective/html": "5.3.*"
}
I have looked everywhere and people suggest to do the following:
/**
* Register bindings in the container.
*
* @return void
*/
public function register()
{
// Bind the app.
$this->app->bind('blog', function ($app) {
return new Blog;
});
// Register LaravelCollective Form Builder.
$this->app->register('Collective\Html\HtmlServiceProvider');
$this->app->alias('Form', 'Collective\Html\FormFacade');
$this->app->alias('Html', 'Collective\Html\HtmlFacade');
}
I currently get the following error everywhere:
FatalThrowableError in Application.php line 610: Class 'Collective\Html\HtmlServiceProvider' not found
Really not sure where I am going wrong.
UPDATE
I have tried bind instead of register:
$this->app->bind('Collective\Html\HtmlServiceProvider');
But this time I get the following error:
Class 'Collective\Html\FormFacade' not found