1

I have a problem with running Lumen's Artisan. There are most of the commands missing.

For an example if I write php artisan routes, I get following error: Command "routes" is not defined.

Below is an example of output that I get by typing php artisan.

Laravel Framework version Lumen (5.2.5) (Laravel Components 5.2.*)

Usage:
command [options] [arguments]

Options:
-h, --help            Display this help message
-q, --quiet           Do not output any message
-V, --version         Display this application version
  --ansi            Force ANSI output
  --no-ansi         Disable ANSI output
-n, --no-interaction  Do not ask any interactive question
  --env[=ENV]       The environment the command should run under.
-v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
help              Displays help for a command
list              Lists commands
migrate           Run the database migrations
cache
cache:clear       Flush the application cache
db
db:seed           Seed the database with records
make
make:migration    Create a new migration file
migrate
migrate:install   Create the migration repository
migrate:refresh   Reset and re-run all migrations
migrate:reset     Rollback all database migrations
migrate:rollback  Rollback the last database migration
migrate:status    Show the status of each migration
queue
queue:failed      List all of the failed queue jobs
queue:flush       Flush all of the failed queue jobs
queue:forget      Delete a failed queue job
queue:listen      Listen to a given queue
queue:restart     Restart queue worker daemons after their current job
queue:retry       Retry a failed queue job
queue:work        Process the next job on a queue
schedule
schedule:run      Run the scheduled commands

Does anyone have any ideas how to fix this?

Mansoor H
  • 594
  • 1
  • 8
  • 25
  • 1
    why didn't you said that you use Lumen and not Laravel http://stackoverflow.com/questions/36077692/laravel-5-2-php-artisan-routes-not-working – Alexey Mezenin Mar 18 '16 at 09:32
  • Though not an exact duplicate. A effective answer is [here](http://stackoverflow.com/questions/30251065/lumen-makecommand) – DavidT Mar 18 '16 at 09:34
  • @AlexeyMezenin sorry . then how can i fix this missing commands in lumen – Mansoor H Mar 18 '16 at 09:37
  • @MansoorH the link I provided above will give you the answer on how to add commands. You will have to create them yourself if you want them. Lumen does not come with them. If you want a full featured framework you should be using Laravel not Lumen. – DavidT Mar 18 '16 at 09:46
  • You need to Install the Package: https://packagist.org/packages/thedevsaddam/lumen-route-list – Saddam H Dec 11 '16 at 19:44

2 Answers2

1

Lumen doesn't natively support the route command. However, in Laravel, you can do the following:

Use php artisan list to show all the commands.

The command you are trying to use should be php artisan route:list

Niraj Shah
  • 15,087
  • 3
  • 41
  • 60
0

You'll need to use Laravel or create commands manually or use package similar to Lumen Route List.

Alexey Mezenin
  • 158,981
  • 26
  • 290
  • 279
  • its shows `PHP Fatal error: Class 'Dotenv' not found in /var/www/html/lumen/bootstrap/app.php on line 5` – Mansoor H Mar 18 '16 at 10:37