Laravel

Topics related to Laravel:

Getting started with Laravel

Laravel StackOverflow Slack Community

Coming soon

Featured Tutorial

Getting Started With Laravel

Contribution Guidelines

Coming soon

Contribution Style Guide

Coming soon

About Laravel

Created by Taylor Otwell as a free open-source PHP web framework, Laravel is meant to ease and accelerate the development process of web applications with a great taste for simplicity.

It follows the model–view–controller (MVC) architectural pattern as well as the PSR-2 coding standard, and the PSR-4 autoloading standard.

Running a Test Driven Development (TDD) in Laravel is fun and easy to implement.

Hosted on GitHub and available at https://github.com/laravel/laravel, Laravel boasts of a micro-services architecture, making it tremendously extendable and this, with ease, with the use of custom-made and or existing third-party packages.

Main Features

MVC

Laravel uses the MVC model, therefore there are three core-parts of the framework which work together: models, views and controllers. Controllers are the main part where most of the work is done. They connect to models to get, create or update data and display the results on views, which contain the actual HTML structure of the application.

Blade Templating Engine

Laravel is shipped with a templating engine known as Blade. Blade is quite easy to use, yet, powerful. One feature the Blade templating engine does not share with other popular ones is her permissiveness; allowing the use of plain PHP code in Blade templating engine files.

It is important to note that Blade templating engine files have .blade appended to file names right before the usual .php which is nothing other than the actual file extension. As such, .blade.php is the resulting file extension for Blade template files. Blade template engine files are stored in the resources/views directory.

Routing & Middleware

You can define the URLs of your application with the help of routes. These routes can contain variable data, connect to controllers or can be wrapped into middlewares. Middelware is a mechanism for filtering HTTP requests. They can be used to interact with requests before they reach the controllers and can thus modify or reject requests.

Artisan

Artisan is the command line tool you can use to control parts of Laravel. There are a lot of commands available to create models, controllers and other resources needed for development. You can also write your own commands to extend the Artisan command line tool.

Eloquent ORM

To connect your models to various types of databases, Laravel offers its own ORM with a large set of functions to work with. The framework also provides migration and seeding and also features rollbacks.

Event Handling

The framework is capable of handling events across the application. You can create event listeners and event handlers that are similar to the ones from NodeJs.

Eloquent

Table naming

The convention is to use pluralised “snake_case” for table names and singular “StudlyCase” for model names. For example:

  • A cats table would have a Cat model
  • A jungle_cats table would have a JungleCat model
  • A users table would have a User model
  • A people table would have a Person model

Eloquent will automatically try to bind your model with a table that has the plural of the name of the model, as stated above.

You can, however, specify a table name to override the default convention.

class User extends Model
{ 
    protected $table = 'customers';
}

Database

Database Seeding

Database Migrations

Artisan

Testing

Routing

Validation

Socialite

Blade Templates

Valet

Because Valet for Linux and Windows are unofficial, there will not be support outside of their respective Github repositories.

Services

Services

Introduction to laravel-5.2

This section provides an overview of what laravel-5.1 is, and why a developer might want to use it.

It should also mention any large subjects within laravel-5.1, and link out to the related topics. Since the Documentation for laravel-5.1 is new, you may need to create initial versions of those related topics.

Installation Guide

This section provides an overview of what laravel-5.4 is, and why a developer might want to use it.

It should also mention any large subjects within laravel-5.4, and link out to the related topics. Since the Documentation for laravel-5.4 is new, you may need to create initial versions of those related topics.

Collections

Pagination

Deploy Laravel 5 App on Shared Hosting on Linux Server

Naming Files when uploading with Laravel on Windows

Queues

Error Handling

Remember to set up your application for emailing by ensuring proper configuration of config/mail.php

Also check to make sure ENV variables are properly set.

This example is a guide and is minimal. Explore, modify and style the view as you wish. Tweak the code to meet your needs. For example, set the recepient in your .env file

Filesystem / Cloud Storage

Requests

Directory Structure

Seeding

Middleware

A "Before" middleware will executes before the controller action code; while a "After" middleware executes after the request is handled by the application

HTML and Form Builder

Task Scheduling

Change default routing behaviour in Laravel 5.2.31 +

Middleware means that every call to a route will go through the middleware before actually hitting your route specific code. In Laravel the web middleware is used to ensure session handling or the csrf token check for example.

There are other middlewares like auth or api by default. You can also easily create your own middleware.

Events and Listeners

Requests

Form Request(s)

Requests are useful when separating your validation from Controller. It also allows you to check if the request is authorized.

Authentication

Route Model Binding

Observer

Policies

Cross Domain Request

Cashier

Laravel Cashier can be used for subscription billing by providing an interface into the subscription services of both Braintree and Stripe. In addition to basic subscription management it can be used to handle coupons, exchanging subscriptions, quantities, cancellation grace periods and PDF invoice generation.

use fields aliases in Eloquent

Eloquent : Relationship

Installation

Eloquent: Model

Laravel Packages

Mail

Eloquent: Accessors & Mutators

Custom Helper function

Getting started with laravel-5.3

This section provides an overview of what laravel-5.3 is, and why a developer might want to use it.

It should also mention any large subjects within laravel-5.3, and link out to the related topics. Since the Documentation for laravel-5.3 is new, you may need to create initial versions of those related topics.

Helpers

Macros In Eloquent Relationship

Constants

lumen framework

Introduction to laravel-5.3

Authorization

CustomException class in Laravel

Multiple DB Connections in Laravel

Remove public from URL in laravel

Permissions for storage

Cron basics

Useful links

Common Issues & Quick Fixes

Laravel Docker

Sparkpost integration with Laravel 5.4

Controllers

Token Mismatch Error in AJAX