yocmen / blade-components by yocmen

This package introduces the concept of components in blade templating, take it from L5.4 for L5.1 LTS
1,248
8
3
Package Data
Maintainer Username: yocmen
Maintainer Contact: yocmen@gmail.com (Yocsel Mendoza)
Package Create Date: 2017-01-24
Package Last Update: 2017-01-30
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-12-11 15:15:51
Package Statistics
Total Downloads: 1,248
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 8
Total Watchers: 3
Total Forks: 1
Total Open Issues: 1

Blade Components and slots for Laravel 5.1.x

This package introduces the concept of components in blade templating for Laravel 5.1.x LTS

Components allow you to extend a view and inject content into it, inline, within your views.

Why?

To make it easier to create reusable components. Maybe, like me, you need this feature in your L5.1.x app and cant upgrade to L5.4.x because is to hard change a big project.

Installation

Begin by installing this package through Composer.

{
    "require": {
        "yocmen/blade-components": "v1.*"
    }
}

Next open up app/config/app.php, comment out the Illuminate View Service Provider, and add the one from this package:

'providers' => array(
    //'Illuminate\View\ViewServiceProvider',
    ...
    'Yocmen\BladeComponents\BladeComponentsServicesProvider',
)

And that's it!

All documentation for this feature u can find it here: https://laravel.com/docs/5.4/blade#components-and-slots