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 Continuing CRUD Deleting & Destroy Data

PHP artisan routes not working

Hi there,

This was a great tutorial, and I have a nicely functioning application, but whenever I try to view the lists of my routes by using 'PHP artisan routes' inside the console, I get an error message:

'Could not open input file: artisan'

I am using a vagrant box on a Windows system with Laravel 5. Anyone have any ideas about this?

Thanks!

Robert London, England

3 Answers

try php artisan route:list from the command line I do that after vagrant ssh into the Homestead box.

Michael McClintock
Michael McClintock
22,580 Points

This solution works for the current version (at the time of this post) -> 5.2.31

php artisan route:list

Thanks Bruce, but I am afraid that I still get the same error: 'Could not open input file: artisan'.

I'm not sure the 'artisan' command is working at all!

Just to make sure we are on the same page... You have Laravel 5 set up with Homestead? You can view the site locally with no problem? You can use the command Vagrant SSH to remote into the Homestead install? Once in by SSH change directory to your project directory. Once there you can type php artisan and you should get a list of available commands. Then type php artisan route:list to get the routes list. (I believe the php artisan route command changed from Laravel 4 to php artisan route:list in version 5) Ley me know what step it is breaking down on and I will see if we can figure it out.

Thanks Bruce - solved the problem now, the command is working coorectly - the problem was that I was not in the correct directory in SSH and unsure of how to navigate to my project directory - but I have worked it out now ;) Thanks!