Loading a composer package into Laravel 5

Solved: I've added the php and illuminate/support packages into my package composer.json file and it started working. I've got no idea why though so if someone could explain, I would really appreciate it.

"require": {
    "php": ">=5.4.0",
    "illuminate/support": "~5.0"
 },

I've created a composer package for Laravel 5 which should generate models based on an existing database schema. However i'm unable to load it in.

I add my Command class into the app/Console/Kernel.php

'IberGeneratorCommandsMakeModelsCommand'

But then I get the following error:

Class IberGeneratorCommandsMakeModelsCommand does not exist 

I'm really new to Laravel and I'm not sure why this is happening since composer generates the autoloader file just fine. I've created and added (into config/app.php) a Service Provider but that doesn't get resolved either. Not sure what I'm doing wrong.

Here's the package:

https://github.com/ignasbernotas/laravel-model-generator


Apparently adding the required attribute with the following packages solved the issue. I'm still not sure why.

"require": {
    "php": ">=5.4.0",
    "illuminate/support": "~5.0"
 },
链接地址: http://www.djcxy.com/p/88644.html

上一篇: 将Composer包添加到Laravel Providers阵列

下一篇: 将一个作曲家包加载到Laravel 5中