Challenge 2: Explore Artisan — Possible Solution ==================================================================== $ php artisan list # (abbreviated — the real output lists many more, grouped by namespace) # # make:controller # make:model # make:migration # migrate # migrate:rollback # route:list # tinker # db:seed # cache:clear # config:clear THREE COMMANDS, EXPLAINED -------------------------- 1. php artisan route:list Prints every registered route in the application — method, URI, controller/action, and route name — in one table. Reach for this when you're not sure whether a route exists, what its name is (for building links), or which controller method actually handles it, without having to search through routes/web.php and every controller by hand. 2. php artisan migrate:rollback Reverts the most recently run batch of database migrations, undoing whatever schema changes they made. Reach for this during development when a migration turns out to be wrong and needs to be fixed and re-run, without needing to manually write the reverse SQL yourself — Laravel migrations define both an up() and a down() method, and rollback runs the down() side. 3. php artisan cache:clear Flushes the application's configured cache store entirely. Reach for this when cached data (config values, compiled views, or application-level cached data covered later in this course) is stale or suspected of causing incorrect behavior, and you want a clean slate without restarting the whole server. WHY THIS WORKS -------------- - php artisan list surfaces every command Artisan knows about, grouped by namespace (make:, migrate:, cache:, etc.) — the fastest way to discover what's available without searching documentation first, exactly the same value Django's manage.py help provides. - Many of these commands come in related families (make:controller, make:model, make:migration all under "make:"; migrate, migrate:rollback, migrate:fresh all under "migrate") — recognizing the family pattern makes it easier to guess at related commands once you know one. - Building the habit of running php artisan list when unsure what's available (rather than only learning commands one at a time from tutorials) pays off as a Laravel project grows more complex — the same habit recommended for Django's manage.py help in Course 1.