菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
2025
0

Laravel5 shifts to 5.1 with many fantastic changes anew

原创
05/13 14:22
阅读数 3265

Beautiful codes crafted to fit in the purpose of developers who have an intense urge for creating faultless websites rapidly, are what Laravel as a platform signifies. From its date of introduction, way back in 2011 Laravel has undergone many updates. Each addition contributed to its flexibility and made it robust in all facets. Just a week before Laravel 5 features have been extended to improve its performance, and the new version is titled as Laravel 5.1. Let us check out some vital modifications made to Laravel 5 that can assist a Laravel development company in multiple ways.

Event broadcasting

In Laravel5.1 programmers can find a new tool for broadcasting events out to Pusher.com. Instead of Pusher.com, developers can resort to the Redis based Socket.io too. Pusher.com and Socket make use of web sockets to establish a connection with the user’s web browser directly. It enables programmers to push an event straightly to the user instead of reloading a page many times. The 5.1 version comes out with a Should Broadcast interface and a much refined Broadcast On method for adding the flexibility of broadcasting events.

Passing of parameters to Middleware

One of the main difficulties that occurred while using Laravel 5 was the passing of parameters to the Middleware. The route filters in Laravel 5 were not well set to handle the passing of parameters to Middleware. With the modifications done to the base codes, Laravel 5.1 has been improved to take parameters passed to the Middleware as well.

New improved Artisan commands

Artisan commands were added to the directory of Laravel to ease the functionality of every application and its interactivity. It is all out of the box commands which increase the flexibility of this platform while developing applications. Still the creation of arguments and calling of complex methods with operators was a tedious task for programmers with older versions of Laravel. Now Laravel 5.1 has simplified syntax which allows programmers to create commands, progress bars, as well as tables very easily.

Blade Service Injection

Programmers had to create separate View Composers for injecting objects into the blade templates, while using Laravel 5. In Laravel 5.1, developers can easily inject an object into the line of codes of Blade templates. Then the codes look nice, crisp, and more understandable.

Source Link: http://agriyaservices.blogspot.in/2015/08/...

发表评论

0/200
2025 点赞
0 评论
收藏
为你推荐 换一批