Laravel
Laravel

Laravel is a very powerful PHP MVC (Model-View-Controller) framework that has gradually and consistently become very popular among PHP developers. Many repedative tasks such as requests, responses, and routing are built into Laravel while including a massive package repository which adds to an impressive list of features and packages that come with Laravel out of the box.

Resources for me while developing

Laravel on Wikipedia
LinkedIn article on 8 best features of Laravel
New features in 5.6


Official Laravel Features & Packages, APIs, and Beyond

Blade Templating Engine

Blade is Laravel's template engine, much like ASP.NET's Razor templating engine for C#. Just like the Razor template engine, Blade can be used to generate markup (HTML) as well as simplifying many procedural PHP syntax. This includes importing routes into a typical link (rather than URL), if/else conditions, and layout. With Blade, you can control multiple layouts and sections, including parent & sibling templates.

Code comparisons and a couple simple examples of Blade vs. Procedural PHP

Carbon

Carbon comes out of the box in Laravel. It's inherits PHP's DateTime class and drastically simplifies many timestamp, timezone, formatting and other retrieval/manipulation tasks. It can be used within many types of classes from Controller classes to Service or Job classes but must have it imported into that class using the "use" directive such as use Carbon\Carbon;

You can "instantiate" (create a new instance of) Carbon two ways.
The first is more standard to Object Oriented Programming: $carbon = new Carbon();. This is equivalent to $carbon = Carbon::now(); (exaplained below) but can also be instantiated as a certain date as well as timezone: $carbon = new Carbon('last day of January 2018', 'America/Chicago');.
You can also create a Carbon instance directly: $dtChicago = Carbon::create('2018, 1, 1, 0, 0, 0, 'America/Chicago');

Carbon also comes with many methods for manipulation of date and time gathering and formatting. Some examples are below:
Add two weeks from today: $twoWeekAdvance = Carbon::now()->addWeeks(2));
Grab tomorrow directly from Carbon: $tomorrow = Carbon::tomorrow('America\Chicago');

A full list of methods for formatting, gathering, and other Carbon functionality can be found Nesbot Carbon Documentation.

Eloquent ORM

Laravel's Eloquent ORM allows the developer/programmer to work directly with database objects and relationships using a straight-forward, eleqant syntax. An Object Relational Mapper (ORM) is "a programming technique for converting data between incompatible type systems using object oriented languages" (Source).

Elquent ORM allows the Model class to be interacted with directly once the "use" directive is added to the beginning of a class that will be using it, such as use App\Users;. From there you can get the following
All users: $users = Users::all();
A certain user: $updatedUser = Users::find($id); (where $id would come through a request such as a form).
Querying can be much simpler: Users::where('first_name', 'Brian')->orderBy('created_at')->get();

As with other MVC frameworks, Model classes can also be in their own folders. Used in the following relationship example, a user can have one profile:
Namespace: namespace App\Models;
Import the Class needed: App\Models\Profile; Relationship:
public function getProfile(){
return $this->hasOne('App\Models\Users', 'id', 'profile_id');
}

More information on Laravel's Eloquent ORM

Artisan CLI

Artisan is Laravels CLI (command-line interface). Artisan CLI grants the functionality of running out of the box commands for creating migration, controller, model classes, and more. It also allows output for development and/or troubleshooting such as checking routes with php artisan route:list or database migration tasks such as rolling back: php artisan migrate:rollback. It also allows the developer to create custom commands to be run either using Carbon or using Cron jobs. These custom commands can be added to the app\Console\Commands such as app\Console\Commands\EmailReminder.php. This is defined class's $signature variable such as $signature = 'email:reminder';. The $description variable allows you to add a description when all commands are listed in php artisan list. The class's handle() method either handles the command itself or will include if you desfine the logic in a Service class.

This command is then registered in Laravel's "Kernel.php" in the $commands method:
protected $commands = [
\App\Console\Commands\EmailReminder::class,
// Other commands here
];

If this is an automated command, such as checking if user passwords are near expiration and it is to be logged, Cron jobs can be used such as the following. It checks at 6:30am everyday and logs results:
protected function schedule(Schedule $schedule){
$schedule->command('email:reminder')
->cron('30 6 * * * *')->timezone('America/Chicago')
->sendOutputTo(base_path('PasswordReminders.log'));
}

If multiple commands need to be scheduled, they are simply added after each one in the schedule() method as above.

More information on Laravel's Artisan CLI

Swiftmailer

Swiftmailer is a Symfony PHP library that includes drivers for SMTP servers, which allows simpler email sending and receiving. Laravel is partially built on components from Symfony and Swiftmailer is included out of the box. Laravel use it under the Mail:: Facade.

Mail::send('emails.reminder', ['data' => $data], function($message) use($data){
$user_email = $data['email'];
$message->from('noreply@company.com', 'Some Company');
$message->to('$user_email');
$message->subject("Your Password Is Expiring!");
});

This sends an email view (in this case within emails/reminder.blade.php) to the user which generates any customization, such as the user's name, from the view and given data (contained in the $data[] array and functionality in the class before the Mail facade).

Information on more Laravel features will be coming to this page very soon.

Sources: