Download the PHP package buzz/laravel-theme without Composer
On this page you can find all versions of the php package buzz/laravel-theme. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download buzz/laravel-theme
More information about buzz/laravel-theme
Files in buzz/laravel-theme
Package laravel-theme
Short Description Theme Management for Laravel 5.*
License MIT
Homepage https://github.com/thinhbuzz/laravel-theme
Informations about the package laravel-theme
Theme Management for Laravel 5.*
Detect device use package serbanghita/Mobile-Detect. If you want to be simple, use a version 1. Note: v2.* switch language to vietnamese
Contents
- Introduction
- Installation
- Configuration
- Structure
- Usage
Introduction
This is package support the management view files and assets under separate folders. Compatible with Laravel 5.*
Installation
The first run command:
and then open config/app.php
add LaravelThemeServiceProvider
to array providers
Add Theme
alias (when set auto_alias => false
in theme config):
Configuration
Publish config file config/theme.php
with command:
php artisan vendor:publish --provider="Buzz\LaravelTheme\LaravelThemeServiceProvider"
Usage
Structure
Assets
Views
Render view
package does not change the way you render view, you still use the View::make
or view()
as default of laravel, read more on views document. If the render view and the view does not exist in the resources/themes/theme-name
, it will render view in resources/views
.
Theme assets
Use themeAsset()
instead of asset()
when link to assets in theme, example:
Change current theme
You can change the theme in the following ways:
Or use function helper
or use Facade
Support methods
Support other config provider
By default package use provider config
of laravel, you can change to provider you want by edit config 'config_provider' => 'provider_name'
P/s: excuse me my English.
All versions of laravel-theme with dependencies
illuminate/support Version 5.0.*|5.1.*
illuminate/routing Version 5.0.*|5.1.*
mobiledetect/mobiledetectlib Version 2.*