Laravel 4 Artisan error when trying to install a bundle - php

I am simply trying to install a laravel bundle via the Artisan CLI using the latest Laravel 4 beta from github.
But when I try something like:
php artisan bundle:install bob
I'm confronted with
[InvalidArgumentException]
There are no commands defined in the "bundle" namespace.
I've had a look around online and can't seem to find a solution to this or even anyone else having similar problems for that matter.
Has anyone else experienced this error or any ideas on a solution?

If you're using Laravel 4 (which based on the tags for this question, you are) then bundles are no longer used.
Out with bundles, in with composer
Instead, Laravel 4 makes use of composer packages. It's kind of similar but at the same time very different in how it works. Here isn't the right place to explain all of composer, so check out the links below to find out more:
Getting started with Laravel 4
How to setup Laravel 4
Composer primer
Laravel 4 Generator
Now, since you were asking about bob, the closest equivalent for the bob bundle would probably be Jeffrey Ways generator package, which you can learn more about here: Laravel-4-Generators

Related

phpstorm problems and issues in laravel method not found, route note found, pdo exception

Hi every one i used phpstorm 9 for laravel and was the best but now from four days it first had the error route not found. i update the composer added the dependencies as told on this link
https://confluence.jetbrains.com/display/PhpStorm/Laravel+Development+using+PhpStorm
then it worked fine for a day then again 'find' method not found 'string', 'integer' not found.
I installed a new window and the whole thing again it did not worked. then i updated the phpstorm to the newest version updated the plugin etc. but the same problem continues and wasted four days.
so can some body explain why is that, do the php storm has some issues or what.
the second thing is, is there any good IDE for laravel like phpstorm which don't have such problems except sublimetext.
#Ijaz Khan did you try to install this package laravel-ide-helper
This will simply solve 90% of your method not found about this packages
This packages generates a file that your IDE can understand, so it can
provide accurate autocompletion. Generation is done, based on the
files in your project, so they are alway up-to-date more here.

Laravel package development with dependacy package

Background
I am new to the Laravel Package.
In my Laravel application I usually run the following command in order to install Bican Rokes, change the config files, etc...
php artisan make:auth
php artisan migrate
Objective
However, this process is tedious, so I was wondering if it is possible to create a package capable of automatizing the process.
What I tried
To achieve this I read the Laravel documentation, which teaches how to create packages, but I was unable to understand if this is possible and if it yes, how it should be done.
Questions
Can a package be used to automate this behaviour?
If yes, can you provide it?
If not, can you explain to me what a package really is? (links to tutorials are welcome)
If I cannot use a package, is there any other way of doing this?
I am not pushing the sale of anything, nor do I know this guy. But this tutorial is a pretty good starting point for laravel.
Laravel Tutorial Series
if a separate package should be created or not will depend on volume of work you want to accomplish. a starting point can be a custom console command, and from with-in that command, you can call multiple other commands.. And from their you can extend it to do other things like editing files etc. If you don't know how to write a console command in Laravel, here is the link to docs: https://laravel.com/docs/5.2/artisan#writing-commands

Upgrading Laravel 4.2 to 5 Sentry not working

I'm trying to upgrade from 4.2 to 5 (and then actually upgraded to 5.1) but I'm having major problems with sentry
I followed instructions to add sentry to L5 here:
How can I use sentry with laravel 5?
With no luck.
Where I'm basically stuck is I got this on my controller:
$user = User::find(Sentry::getUser()->id);
When I try to view the page I get:
Trying to get property of non-object
So it seems it's simply not working.
I've tried multiple ways to get it to work, another one being:
https://cartalyst.com/manual/sentry/2.1#migrations
migration:
php artisan migrate --package=cartalyst/sentry
doesn't work with it though, as I understand this was removed. I really don't know could that help me with any way? Not very knowledgeable with this :)
Original app is not coded by me so I have not integrated the sentry in first place so I might be missing something obvious.

Laravel Juploader bundle using composer

Ok i found in other questions in stackoverflow, that artist bundles are not good any more, that you may use composer. but i cant install juploader.
php artisan bundle:install juploader
USING this trhow:
[InvalidArgumentException]
There are no commands defined in the "bundle" namespace.
http://bundles.laravel.com/bundle/juploader
is this really necesary or i just need to insert the next line in bundle.php (creating one?)
'juploader' => array('handles' => 'upload'),
I need to install juploader, or the best jquery upload file for laravel, that make life easy, XD jaja not more complicated. in the past juploader was easy to install, but im afraid is out of date now.
How can i install this, or maybe there is a newer one that works like charm on 4.1 laravel?

Run command in symfony2

I'm trying to create my first page in Symfony2 according to this tutorial: http://symfony.com/doc/2.0/book/page_creation.html. Can anyone please tell how should I run this command:
php app/console init:bundle "Acme\StudyBundle" src
I'm new to symfony and I have no idea what this means...
php app/console init:bundle "Acme\StudyBundle" src
is a shell command you're meant to run at the command line of the machine you've installed Symfony on. You change into the directory where you installed symfony, and run it -- how you do that is obviously operating system- and installation-dependent.
The command itself invokes the command-line version of your PHP interpreter (php) to run Symfony's console script (app/console) to initialise a new Symfony bundle (init:bundle) called StudyBundle, from the (pretend!) company Acme (Acme\StudyBundle) in the directory src.
For me, running it would look a bit like this (from Terminal, on a Mac):
Matt-Gibsons-iMac:~ matt$ cd Sites/Symfony
Matt-Gibsons-iMac:Symfony matt$ php app/console init:bundle "Acme\StudyBundle" src
Summary of actions
- The bundle "AcmeStudyBundle" was created at "src/Acme/StudyBundle" and is using the namespace "Acme\StudyBundle".
...
A word of warning, though: Symfony 2 is still very new -- not yet even officially released -- and while what documentation there is is okay, the docs are nothing like as complete or helpful to the beginner as the excellent, mature documentation for Symfony 1.4. Also, Symfony 2 best practices have yet to be established.
So, if you're a complete Symfony novice you might find Symfony 1.4 easier going, especially following the Jobeet tutorial. Even though Symfony 2 is quite a big change from Symfony 1, learning Symfony 1 will introduce you to a lot of concepts that remain familiar in Symfony 2, such as generating new code modules from the command line, like you're trying to do here.

Categories