Overview

Courses Benefits

Laravel Framework is an open-source PHP class library designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities used in Web development such as database access, authentication, templating, allowing you to focus on your application's specific requirements. By the end of the course, students will have completed a secure, Create, Read, Update, Delete (CRUD) application.

You Will Learn How To

  • Apply best practices in web application development
  • Develop scalable enterprise web applications using the Laravel Framework
  • Implement the MVC design pattern to create maintainable applications
  • Access various databases in a vendor-independent way
  • Validate and pre-populate forms automatically
  • Secure your application through proper authentication and authorization

Who Should Attend

This Laravel Framework training course is for intermediate PHP developers. Knowledge of PHP at the level of Course 221 - Web Development with PHP, plus real-world PHP experience are assumed. Participants should also know Object-Oriented PHP.

Course Outline

Getting Started with Laravel Framework

  • What is the Laravel Framework?
  • The MVC Architectural Pattern
  • Features of Laravel

Quickstart

  • Installing Laravel
  • Creating a Laravel Application
  • Configuring Your Web Server for Laravel
  • Using PHP's Built-In Web Server

Routing

  • What is Routing?
  • Route Files
  • Defining Routes
  • Redirecting Routes
  • Routing to Views
  • Acquiring Route Parameters

Controllers

  • Creating a Controller
  • Creating a Route to a Controller
  • Creating a Resource Controller
  • Creating a Route to a Resource Controller
  • Viewing the List of Routes
  • Adding Methods to a Resource Controller

Requests and Responses

  • Request
      Getting the Request Object
      Getting Request Parameters
      Processing File Uploads
      Getting the Request Method
      Getting Cookie Data
  • Response
      Returning a View
    1. Returning a String
    1. Returning JSON Data
    1. Specifying the Status Code
    1. Specifying Response Header
    1. Sending Files to the Client
    1. Redirecting
    1. Adding Cookie Data

Views

  • Creating Views
  • Passing Data from Controllers to Views
  • Using Blade Statements

Configuration

  • Standard Configuration Files
  • Accessing Application Configuration
  • Accessing Environment Configuration

Sessions

  • Configuring Sessions
  • Storing Data
  • Retrieving Data
  • Flashing Data
  • Deleting Data

Forms

  • Creating Basic Forms
  • Protecting Against CSRF
  • Validating Form Input

Database Access and Eloquent ORM

  • Specifying Database Configuration
  • Using Migrations
  • Running SQL
  • Building Queries using Query Builder
  • Creating Models using Eloquent ORM

CRUD

  • Review: Creating a Resource Controller
  • Displaying All Resources
  • Displaying and Processing the Create Form
  • Displaying a Single Resource
  • Displaying and Processing the Edit / Update Form
  • Adding Delete Functionality
  • Putting It All Together

RESTful APIs

  • Understanding REST APIs
  • Creating API Routes and Controllers

Implementing CRUD Operations

  • Review: Creating a Resource Controller
  • Displaying All Resources
  • Displaying and Processing the Create Form
  • Displaying a Single Resource
  • Displaying and Processing the Edit / Update Form
  • Adding Delete Functionality
  • Putting It All Together

Security

  • Introduction
  • Setting Up Authentication
  • Using Authentication
  • Adding Authorization Logic
  • Putting It All Together

Error Handling and Logging

  • Manually Generating an HTTP Error
  • Creating Custom HTTP Error Pages
  • Disabling Debugging Information
  • Writing Log Messages

Blade Templates

  • Defining a Layout
  • Using a Layout within Views
  • Including Sub-views