You are not logged in.

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.

Announcement

    Laravel 4 Advanced Architecture: Book Now On Sale

#1 2013-07-26 10:35:57

BARThompson
Artisan
Registered: 2013-07-11
Posts: 46

php artisan bundle:install not working

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?

Offline

#2 2013-07-26 10:42:05

spescina
Artisan
From: Italy
Registered: 2013-07-26
Posts: 19

Re: php artisan bundle:install not working

Laravel 4 don't uses bundles anymore. It's been ported to composer, so you can search between composer packages and use them.

Offline

#3 2013-07-26 10:46:24

BARThompson
Artisan
Registered: 2013-07-11
Posts: 46

Re: php artisan bundle:install not working

Ah - that makes sense. Where do I find out if resizer is available as a composer package?

Many thanks for your help.

Offline

#4 2013-07-26 10:51:01

spescina
Artisan
From: Italy
Registered: 2013-07-26
Posts: 19

Re: php artisan bundle:install not working

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.

Offline

#5 2013-07-27 04:49:28

BARThompson
Artisan
Registered: 2013-07-11
Posts: 46

Re: php artisan bundle:install not working

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?

Specifically:

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?

Many thanks

Offline

#6 2013-07-27 05:50:04

kennethrapp
Artisan
Registered: 2012-08-18
Posts: 74

Re: php artisan bundle:install not working

Composer does have an option to add arbitrary and even private repos: http://getcomposer.org/doc/05-repositories.md (a little more than halfway down)

Offline

#7 2013-07-27 07:29:02

BARThompson
Artisan
Registered: 2013-07-11
Posts: 46

Re: php artisan bundle:install not working

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...

Offline

#8 2013-07-28 01:51:06

kennethrapp
Artisan
Registered: 2012-08-18
Posts: 74

Re: php artisan bundle:install not working

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:

http://fideloper.com/laravel-4-applicat … utoloading
and barring that maybe: http://stackoverflow.com/questions/1715 … -framework

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.

Offline

#9 2013-08-08 20:43:18

korenzo
Artisan
From: New Jersey
Registered: 2012-10-19
Posts: 5

Re: php artisan bundle:install not working

Came across this for L4. Going to test this out with my current project.

Since I cannot post links, Google:
Intervention Image Class

Offline

Board footer

Powered by FluxBB

');