Last Updated: February 25, 2016
·
3.782K
· teepluss

Laravel 4 Theme

Installation

Add this line to composer.json

require: {
    "teepluss/theme": "dev-master"
}

Then run CLI

$ composer update

Autoload service provider.

'providers' => array(
    .....
   'Teepluss\Theme\ThemeServiceProvider'
)

Class alias

'aliases' => array(
    .....
    'Theme' => 'Teepluss\Theme\Facades\Theme',
)

Publish theme config using artisan cli.

$ php artisan config:publish teepluss/theme

See more document

https://github.com/teepluss/laravel4-theme

1 Response
Add your response

helo tee,
i have tried your theme library to my app.

As shown on your example code, an error occurred when action returning $theme->of(), but working when returning $theme->render().

And since main place is not always named "content", direct injecting content of main place to array $this->region['content'] is not elegant solution i think.

over 1 year ago ·