2017 © Pedro PelΓ‘ez
 

library laravel-theme

Simple theme manager for Laravel 5.

image

intentor/laravel-theme

Simple theme manager for Laravel 5.

  • Thursday, August 27, 2015
  • by Intentor
  • Repository
  • 2 Watchers
  • 11 Stars
  • 228 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 2 % Grown

The README.md

Laravel Theme

Simple theme manager for Laravel 5, (*1)

Currently the project is DISCONTINUED. However, feel free to fork it and continue its development!, (*2)

Contents

  1. Introduction
  2. Installation
  3. Quick start
  4. Best practices
  5. Limitations
  6. Changelog
  7. Support
  8. License

Introduction

Laravel Theme provides a simple way to manage themes on a Laravel app., (*3)

Compatible with Laravel 5., (*4)

Installation

Laravel 5.0

At composer.json of your Laravel installation, add the following require line:, (*5)

``` json { "require": { "intentor/laravel-theme": "~1.0" } }, (*6)


Run `composer update` to add the package to your Laravel app. At `config/app.php`, add the Service Provider and the Facade: ```php 'providers' => [ 'Intentor\LaravelTheme\ServiceProvider', ] //... 'aliases' => [ 'Form' => 'Intentor\LaravelTheme\Facade', ]

Laravel 5.1+

At composer.json of your Laravel installation, add the following require line:, (*7)

``` json { "require": { "intentor/laravel-theme": "~1.0" } }, (*8)


Run `composer update` to add the package to your Laravel app. At `config/app.php`, add the Service Provider and the Facade: ```php 'providers' => [ Intentor\LaravelTheme\ServiceProvider::class, ] //... 'aliases' => [ 'Form' => Intentor\LaravelTheme\Facade::class, ]

Quick start

Creating a theme

To create a theme, first add a themes folder to the resources folder of your app., (*9)

Inside the themes folder, any folder you create will represent a theme. For each theme folder, add a views folder, in which you'll create all the views for that particular theme., (*10)

The folder structure will look like this:, (*11)

resources
└── themes
    β”œβ”€β”€ [theme folder]
    |   └── views
    |
    └── [another theme folder]
        └── views

Setting a theme

To set a theme, call Theme::set('theme_name') anywhere you want to change your theme., (*12)

Remember: the name of theme is the name of the folder that represents the theme at the resources/themes folder., (*13)

Displaying views

To display a view, just call view('view_name') without indicating any reference to the theme., (*14)

Adding assets

To add assets to pages, just include them pointing to their location at the public folder., (*15)

Best practices

1. Add any assets (images, CSS, JS, etc.) for the theme in a specific folder inside the public folder., (*16)

2. If you're using a task manager (like Gulp or Grunt) it's recommended to add assets at an assets folder inside the theme and then move the files to the public location., (*17)

resources
└── themes
    β”œβ”€β”€ [theme folder]
    |   β”œβ”€β”€ css/sass/less
    |   β”œβ”€β”€ img
    |   β”œβ”€β”€ js
    |   └── views
    |
    └── [another theme folder]
        β”œβ”€β”€ css/sass/less
        β”œβ”€β”€ img
        β”œβ”€β”€ js
        └── views

3. Create shared views at the resources/views folder., (*18)

4. Views in themes always override shared views., (*19)

Limitations

  1. Asset management can be rather awkward, given the views for the theme are outside the public folder.

Changelog

Please see CHANGELOG.md., (*20)

Support

Found a bug? Please create an issue on the GitHub project page or send a pull request if you have a fix or extension., (*21)

You can also send me a message at support@intentor.com.br to discuss more obscure matters about the component., (*22)

License

Licensed under the The MIT License (MIT). Please see LICENSE for more information., (*23)

The Versions

27/08 2015

dev-master

9999999-dev https://github.com/intentor/laravel-theme

Simple theme manager for Laravel 5.

  Sources   Download

MIT

The Requires

 

template assets theme blade view laravel-5

27/08 2015

dev-develop

dev-develop https://github.com/intentor/laravel-theme

Simple theme manager for Laravel 5.

  Sources   Download

MIT

The Requires

 

template assets theme blade view laravel-5

27/08 2015

v1.2

1.2.0.0 https://github.com/intentor/laravel-theme

Simple theme manager for Laravel 5.

  Sources   Download

MIT

The Requires

 

template assets theme blade view laravel-5

18/03 2015

v1.1

1.1.0.0 https://github.com/intentor/laravel-theme

Simple theme manager for Laravel 5.

  Sources   Download

MIT

The Requires

 

template assets theme blade view laravel-5

18/03 2015

v1.0

1.0.0.0 https://github.com/intentor/laravel-theme

Simple theme manager for Laravel 5.

  Sources   Download

MIT

The Requires

 

template assets theme blade view laravel-5