Duration
Laravel 101
3 days
Overview
Laravel is a robust and elegant PHP web framework renowned for its developer-friendly syntax and comprehensive suite of features. It streamlines common web development tasks such as routing, templating, database interactions, authentication, and more, empowering developers to build complex web applications with ease.
Course Objectives
Upon completion of this Laravel training, participants will be able to:
- Understand the fundamentals of the Model-View-Controller (MVC) architectural pattern.
- Set up a Laravel development environment and create new Laravel projects.
- Define routes, create controllers, and develop views using Blade templating.
- Interact with databases using Eloquent ORM, performing CRUD operations.
- Implement user authentication and authorization using Laravel's built-in features.
- Work with migrations and seeders for database management.
- Develop a basic web application using Laravel, applying learned concepts.
Target Audience
- PHP developers who want to learn a modern PHP framework.
- Web developers familiar with HTML, CSS, and JavaScript who want to build dynamic web applications.
- Developers with some experience in other web frameworks who want to learn Laravel.
Course Methodology
This training will employ a blended learning approach, combining:
- Interactive Lectures
- Live Coding Demonstrations
- Hands-on Exercises and Labs
- Group Discussions and Q&A
- Project-Based Learning
- Resources and Documentation
Day 1: Introduction to Laravel and Basic Setup
- Introduction to PHP and MVC Architecture
- Variables
- Data types
- Control structures
- Model-View-Controller architectural pattern.
- What is Laravel?
- Laravel's features, benefits, and ecosystem.
- Comparison with other PHP frameworks.
- Setting up a Development Environment (2 hours):
- Installing PHP, Composer, and a local web server (e.g., XAMPP, Laragon, Valet, Docker).
- Creating a new Laravel project using
- Understanding the project structure
- Running the development server
- Routing
- Defining routes (basic routes, route parameters, named routes).
- Understanding HTTP methods (GET, POST, PUT, DELETE).
- Route groups and middleware (basic introduction).
- Controllers
- Creating controllers
- Defining controller methods and returning responses (views, JSON).
- Views and Blade Templating (1 hour):
- Creating Blade templates (.blade.php).
- Using Blade directives (e.g., @if, @foreach, @include, @extends, @yield).
- Passing data from controllers to views.
Day 2: Database Interactions and Eloquent ORM
- Database Setup and Migrations
- Configuring database connections (.env file).
- Creating database migrations
- Defining table schemas (columns, data types, indexes).
- Running migrations
- Understanding migration rollback (php artisan migrate:rollback).
- Eloquent ORM
- Creating Eloquent models.
- Defining model properties and relationships.
- Performing database queries using Eloquent (e.g., all(), find(), where(), create(), update(), delete()).
- Working with relationships (one-to-one, one-to-many, many-to-many - basic introduction).
- CRUD Operations (Create, Read, Update, Delete)
- Building a simple CRUD application (e.g., managing a list of tasks or blog posts).
- Creating forms for data input.
- Handling form submissions and validating data.
- Displaying data in views.
Day 3: Advanced Topics and Project Building
- Authentication
- Using Laravel Breeze or Jetstream for scaffolding authentication.
- Understanding authentication routes, controllers, and views.
- Customizing authentication (if time allows).
- Middleware
- Understanding middleware and its use cases (e.g., authentication, authorization).
- Creating custom middleware.
- Project Work
- Participants work on a small project that incorporates the concepts learned during the training (e.g., a simple blog, a task manager).
- Q&A and Wrap-up
- Open discussion and Q&A session.
- Review of key concepts.
- Resources for further learning.
Programme scope, delivery arrangements and suitability are confirmed during enquiry.