Important Note: This forum is being archived and will be completely locked down on the 7th of February. The new forum can be found at http://laravel.io.
I am trying to install the resizer bundle. According to its instructions I should use the command:
php artisan bundle:install resizer
However, this brings up the following error:
[InvalidArgumentException] There are no commands defined in the "bundle" namespace.
When I run:
php artisan list
I dont get bundle:install as a possible command. Is this a version 3 command which has been deprecated or something?
Laravel 4 don't uses bundles anymore. It's been ported to composer, so you can search between composer packages and use them.
Ah - that makes sense. Where do I find out if resizer is available as a composer package?
Many thanks for your help.
I think if this bundle has a L4 version there will be written in its github page, but there isn't.
you can point your browser to packagist.org and search for a similar php package. composer allows you to install framework-agnostic (laravel in this case) packages so I think you can find something interesting too.
Is it possible (and if so, how) can I just take the raw code from Github for the resizer class and include it in my app?
1. In which folder should I save the file?
2. How do I instruct Laravel 4 to load this class so I can use it?
3. Is there anything else I would need to do to make it work?
I was thinking even more basic than that - i.e. without using composer (only ever used it to install laravel, so not well versed in it!).
Can I just copy the source code into my app? If so, where do I save and it and how do I ensure it is loaded etc...
You would still need to edit your composer.json file to have it added to the autoloader, then probably run artisan dump-autoload. Here's something that might work:
But doing it through Composer actually takes the least amount of work. You just have to add the repositories then install and it takes care of generating the autoloader and everything. After many moons of having to manually include_once library after library, it really is worth learning.