Laravel Basics: Non-web routes

Join the AI Workshop to learn more about AI and how it can be applied to web development. Next cohort February 1st, 2026

The AI-first Web Development BOOTCAMP cohort starts February 24th, 2026. 10 weeks of intensive training and hands-on projects.


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