Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Laravel 4 Basics Laravel Controllers RESTful Controllers

Problem with php artisan in console

vagrant@homestead:~/Sites/laravel-basics$ php artisan controller:make MyersController

When I run the command to make a controller, I receive the following error:

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

Is this due to me running laravel 5? Bit confused as to why I am getting this error

2 Answers

Mike Costa
PLUS
Mike Costa
Courses Plus Student 26,362 Points

I'm not too familiar with laravel 5, but I remember reading somewhere that they changed the command for it.

  • Laravel 4: php artisan controller:make MyersController
  • Laravel 5: php artisan make:controller MyersController

http://laravel.com/docs/5.0/commands

Thanks a lot Mike!

Anthony c
Anthony c
20,907 Points

copy past this:

php artisan route:list

that's what I was looking for. Thanks