Due to the regular advancement in technologies and trends, we have seen gradual updates in popular web and mobile technologies. So, here we are going to discuss new development changes that have been released in Laravel 5.4. As we all knows, Laravel is top ranking PHP framework of now a days. It already includes different powerful features which make it a perfect framework for web development. Version 5.4 has been released for development. Improvements are necessary to enhance the quality. We will discuss these changes one by one. Please have a look.
1) Markdown Mailing System : Markdown enabled mailing system has been added as a new feature in Laravel. It provides pre-built templates and components for mail notification. You can also send message through emails, SMS and different channels. Responsive or plain text templates can be generated by this markdown system. Please have a look Markdown email template.
@component('mail:message')
# Thank You
Thank you for reading this blog. You can read our other blog. Please click on below link.
@component('mail::button', ['url' => $actionUrl, 'color' => $color])
{{ $actionText }}
@endcomponent
@endcomponent
2) Automatic Facades : Now Laravel provides real-time facades. Through this feature, you can use any class of your application as facade. You can create any class in your application and use that as facade. Please have a look.
<?php
namespace App\blogs;
class FindnerdBlogs
{
protected $blogs;
public function currentBlog($blogId)
{
// Pay an amount...
}
}
You can use this class as facade like below.
use Facades\ {
App\blogs\FindnerdBlogs
};
Route::get('/currentBlog/{blogId}', function ($blogId) {
FindnerdBlogs::currentBlogs($blogId);
});
3) Custom Pivot Table Models : If we talk about the previous version 5.3 we use the same built-in model instance for belongsToMany relationship. In new version we can define custom models for all pivot tables.
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Role extends Model
{
/**
* The users that belong to the role.
*/
public function users()
{
return $this->belongsToMany('App\User')->using('App\UserRole');
}
}
4) Improved Redis Cluster Support : This enables Redis connections to multiple single hosts as well as multiple cluster within the aplication.
5) Migration Default String Length : ByDefault it enables to use utf8mb4 character set which supports to store the "emojis" in the database.
6) Job Level Retry & Timeout : Now we can configure the settings as per the job basis. We can define in job class directly.
7) Laravel Mix : Laravel Mix is the next step of Elixir. Webpack based Laravel mix provides API for defining the build steps by using CSS and Javascript pre-processors.
8) Broadcast Model Binding : It comes with implicit and explicit route model binding like http routes.
9) Collection Higher Order Messages : There are different collections methods to perform higher order messages. These methods are contains, each, every, filter, first, map, partition, reject, sortBy, sortByDesc, and sum.
Thank you for reading this blog!
0 Comment(s)