Matt Stauffer 6/8/2015

Injecting an object (from the IOC) using Laravel Blade Service Injection

Read Original

This article details the Laravel 5.1 Blade Service Injection feature, which allows developers to inject objects from the Inversion of Control container directly into Blade templates using the @inject directive. It provides a practical example comparing the old method of passing services via controllers to the new, cleaner approach, while cautioning against overusing logic in views.

Injecting an object (from the IOC) using Laravel Blade Service Injection

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

No top articles yet