When you execute command generator php artisan generate:controller EventController and this error comes out

[InvalidArgumentException]
There are no commands defined in the "generate" namespace.

Here is the solution:
The generate command is from the JeffreyWay/Laravel-4-Generators package, to install it you have to execute
composer require way/generators 2.*
And then add this line to your app/config/app.php in the Service Providers array:
'Way\Generators\GeneratorsServiceProvider'

Verify the package installed successfully, just execute the following:
php artisan

And check if you have the following commands available:

generate
generate:controller Generate a controller
generate:migration Generate a new migration
generate:model Generate a model
generate:pivot Generate a pivot table
generate:publish-templates Copy generator templates for user modification
generate:resource Generate a new resource
generate:scaffold Scaffold a new resource (with boilerplate)
generate:seed Generate a database table seeder
generate:view Generate a view