AI Workshop: learn to build apps with AI →
Laravel Basics: Non-web routes

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


In the routes folder you have web.php, but not just that file. We have api.php, channels.php and console.php.

  • web.php handles HTTP requests from web browsers

  • api.php handles API endpoints. We use it to create an API that can be used for example by a mobile application, or directly by the users (if that’s something you want them to)

  • console.php contains routes used by the command line interface, Artisan. We can write command line applications for our app, in PHP, and execute them, it’s pretty handy.

Lessons in this unit:

0: Introduction
1: Getting started
2: Dynamic routes
3: Dynamic routes advanced
4: ▶︎ Non-web routes
5: Dynamic routes in Laravel
6: Introduction to Laravel