Coming soon
Coming soon
Coming soon
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.
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.
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.
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 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.
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.
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.
Table naming
The convention is to use pluralised “snake_case” for table names and singular “StudlyCase” for model names. For example:
cats
table would have a Cat
modeljungle_cats
table would have a JungleCat
modelusers
table would have a User
modelpeople
table would have a Person
modelEloquent 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';
}
Because Valet for Linux and Windows are unofficial, there will not be support outside of their respective Github repositories.
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.
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.
Illuminate\Support\Collection
provides a fluent and convenient interface to deal with arrays of data. You may well have used these without knowing, for instance Model queries that fetch multiple records return an instance of Illuminate\Support\Collection
.
For up to date documentation on Collections you can find the official documentation here
To get more information on deploying Laravel project on shared hosting, visit this Github repo.
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
Database seeding allows you to insert data, general test data into your database. By default there is a DatabaseSeeder
class under database/seeds
.
Running seeders can be done with
php artisan db:seed
Or if you only want to process a single class
php artisan db:seed --class=TestSeederClass
As with all artisan commands, you have access to a wide array of methods which can be found in the api documentation
A "Before" middleware will executes before the controller action code; while a "After" middleware executes after the request is handled by the application
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.
Requests are useful when separating your validation from Controller. It also allows you to check if the request is authorized.
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.
Just a few pointers:
function_exists
) to prevent exceptions when the service provider is called twice.composer.json
file. You can copy the logic from the laravel framework itself.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.