Free Online Course · Self-paced

Laravel Tutorial for Beginners (Step by Step)

Free, hands-on Laravel tutorial - install, routes, Eloquent ORM, Blade templates, authentication, Sanctum/Passport, validation, file storage, queues, mail, and production deployment. 40+ tested lessons.

  • 63 parts
  • ~538 min total
  • Beginner to Intermediate
  • Updated May 2026
Laravel Tutorial for Beginners (Step by Step)
By Last updated

Laravel is the most-used PHP framework on the planet, and once you internalize its conventions (service container, Eloquent ORM, Blade templates, middleware) it lets you build complete production web apps faster than almost anything else. This tutorial covers the practical Laravel - the parts you will actually use shipping real applications.

We start with installation and the request lifecycle, then move through routing and Blade templates, Eloquent ORM with migrations and relationships, the full authentication ecosystem (Breeze, Jetstream, Sanctum, Passport, policies), validation, storage, mail, and APIs (REST + GraphQL). Performance and tooling come next (Octane, Horizon, Debugbar, Pennant), then admin scaffolds (Voyager, Nova) and finally deployment (Docker, Sail, Forge). Every example is a complete, runnable snippet.

Click Start the course to begin with installation, or jump to the chapter you need - Eloquent ORM and Authentication and Authorization are the most-bookmarked.

What you'll learn

  • Install Laravel and understand its directory layout and request lifecycle
  • Build routes, controllers, and Blade templates
  • Model data with Eloquent ORM, migrations, and relationships
  • Implement authentication (Breeze, Jetstream, Sanctum, Passport) and authorization (Gates, Policies, Spatie permissions)
  • Build REST and GraphQL APIs, send mail, handle file uploads, and schedule jobs
  • Run Laravel in Docker, deploy to production with Forge, and tune with Octane

Prerequisites

  • PHP 8.1+ and Composer installed locally
  • Basic PHP, HTML/CSS, and SQL knowledge
  • A database server (MySQL/MariaDB or PostgreSQL) - SQLite works for chapters 1-4
  • Comfortable on the command line

Syllabus

10 chapters · 63 lessons · ~538 min of reading

  1. 1 Getting Started 7 lessons
    1. Part 1 Install Laravel 7 min read
    2. Part 2 Run your first Laravel project 7 min read
    3. Part 3 Upgrade Laravel to the latest version 6 min read
    4. Part 4 Remove /public from Laravel URLs 12 min read
    5. Part 5 Get the base URL in Laravel 5 min read
    6. Part 6 Change the Laravel timezone 5 min read
    7. Part 7 Set correct file permissions for Laravel 8 min read
  2. 2 Routing, Blade and Helpers 5 lessons
    1. Part 8 Route groups and array parameters 14 min read
    2. Part 9 Set variables in a Blade template 6 min read
    3. Part 10 Show a newline in Blade output 6 min read
    4. Part 11 Create a custom Laravel helper 6 min read
    5. Part 12 timeSince() helper in Laravel 6 min read
  3. 3 Eloquent ORM and Database 16 lessons
    1. Part 13 Laravel Eloquent ORM tutorial 15 min read
    2. Part 14 Laravel migrations explained 10 min read
    3. Part 15 Add a new column to an existing table 9 min read
    4. Part 16 Make a column nullable in a migration 4 min read
    5. Part 17 Select specific columns with Eloquent 7 min read
    6. Part 18 Use whereIn() with Eloquent 5 min read
    7. Part 19 whereHas() for relationship constraints 16 min read
    8. Part 20 withCount() for related-row counts 7 min read
    9. Part 21 Get the last inserted ID 6 min read
    10. Part 22 Laravel soft delete 10 min read
    11. Part 23 Disable Eloquent timestamps 6 min read
    12. Part 24 Eager loading inside foreach loops 13 min read
    13. Part 25 Recursively find values in an array 6 min read
    14. Part 26 Sort by pivot table columns 10 min read
    15. Part 27 Sort by multiple columns 7 min read
    16. Part 28 Set up Laravel pagination Coming soon
  4. 4 Authentication and Authorization 11 lessons
    1. Part 28 Laravel authentication explained 13 min read
    2. Part 29 Laravel Breeze - lightweight auth scaffold 6 min read
    3. Part 30 Laravel Jetstream 8 min read
    4. Part 31 Laravel Sanctum - SPA and API tokens 8 min read
    5. Part 32 Laravel Passport - full OAuth2 server 20 min read
    6. Part 33 Customize auth routes in Laravel 8+ 9 min read
    7. Part 34 Reset password flow in Laravel 6 min read
    8. Part 35 Hash and verify passwords 7 min read
    9. Part 36 Gates and policies for authorization 8 min read
    10. Part 37 Role-based permissions with spatie/permission 8 min read
    11. Part 38 Check user online/offline status 8 min read
  5. 5 Validation, Storage and Mail 7 lessons
    1. Part 39 Laravel validation tutorial 15 min read
    2. Part 40 Use the "in" validation rule 6 min read
    3. Part 41 Laravel storage disks 8 min read
    4. Part 42 Delete a file with Laravel 6 min read
    5. Part 43 Send emails in Laravel 13 min read
    6. Part 44 Laravel gallery management 11 min read
    7. Part 45 Generate PDFs in Laravel 4 min read
  6. 6 APIs and Integrations 5 lessons
    1. Part 46 Create a REST API in Laravel 7 min read
    2. Part 47 Create a GraphQL API in Laravel 14 min read
    3. Part 48 Call external APIs from Laravel 5 min read
    4. Part 49 Laravel Kafka integration tutorial 5 min read
    5. Part 50 Real-time UI with Laravel Livewire 8 min read
  7. 7 Performance, Logs and Tooling 6 lessons
    1. Part 51 Clear the Laravel cache 5 min read
    2. Part 52 Clean and rotate Laravel logs 6 min read
    3. Part 53 Debug with Laravel Debugbar 7 min read
    4. Part 54 Laravel Octane for high performance 11 min read
    5. Part 55 Manage queues with Laravel Horizon 6 min read
    6. Part 56 Feature flags with Laravel Pennant 11 min read
  8. 8 Background Jobs and Scheduling 1 lesson
    1. Part 57 Set up a cron schedule for Laravel 13 min read
  9. 9 Admin Tooling and Boilerplates 3 lessons
    1. Part 58 Voyager - Laravel admin panel 4 min read
    2. Part 59 Laravel Nova admin panel 17 min read
    3. Part 60 Laravel boilerplate starter 9 min read
  10. 10 Deployment 3 lessons
    1. Part 61 Run Laravel in Docker 12 min read
    2. Part 62 Laravel Sail tutorial 7 min read
    3. Part 63 Deploy with Laravel Forge 8 min read
Deepak Prasad

R&D Engineer

Founder of GoLinuxCloud with over a decade of expertise in Linux, Python, Go, Laravel, DevOps, Kubernetes, Git, Shell scripting, OpenShift, AWS, Networking, and Security. With extensive experience, he excels across development, DevOps, …

  • Red Hat Certified System Administrator in Red Hat OpenStack
  • Certified Kubernetes Application Developer (CKAD)
  • Red Hat Certified Specialist in Ansible Automation
  • Go (programming language)
  • Python (programming language)
  • DevOps
  • Computer Security