I have created a package for Laravel, the package is using its own composer.json for specifying requirements. The problem is how to make Laravel's composer to "include" the package's composer requirements? so that when I run composer update the package requirements installed along with the app requirements.
I used normal composer for package:
Path: app/packages/intropkg/composer.json
"require": {
"spatie/emoji": "^1.0"
},
but when calling the package from Laravel I get the error: Class 'Spatie\Emoji\Emoji' not found
Laravel composer related config:
Path: app/composer.json
"autoload": {
...
"psr-4": {
"App\\": "app/",
"Lsdev\\Intropkg\\": "packages/intropkg/src"
}
}
composer dump-autoload? - Jiteemojipackage? - lagboxcomposer require spatie/emoji) then you need to runcomposer installto install the new package. - Mathew Tinsley