https://github.com/intentor/laravel-theme
Simple theme manager for Laravel 5
https://github.com/intentor/laravel-theme
discontinued laravel php plugin
Last synced: 5 months ago
JSON representation
Simple theme manager for Laravel 5
- Host: GitHub
- URL: https://github.com/intentor/laravel-theme
- Owner: intentor
- License: other
- Created: 2015-03-16T12:43:38.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-11-17T23:59:15.000Z (over 6 years ago)
- Last Synced: 2025-07-26T14:47:55.570Z (11 months ago)
- Topics: discontinued, laravel, php, plugin
- Language: PHP
- Homepage:
- Size: 14.6 KB
- Stars: 10
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 
**Simple theme manager for Laravel 5**
Currently the project is **DISCONTINUED**. However, feel free to fork it and continue its development!
## Contents
1. Introduction
2. Installation
3. Quick start
4. Best practices
5. Limitations
6. Changelog
7. Support
8. License
*Laravel Theme* provides a simple way to manage themes on a Laravel app.
Compatible with Laravel 5.
### Laravel 5.0
At `composer.json` of your Laravel installation, add the following require line:
``` json
{
"require": {
"intentor/laravel-theme": "~1.0"
}
}
```
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:
``` json
{
"require": {
"intentor/laravel-theme": "~1.0"
}
}
```
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,
]
```
### Creating a theme
To create a theme, first add a `themes` folder to the `resources` folder of your app.
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.
The folder structure will look like this:
```
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.
**Remember**: the name of theme is the name of the folder that represents the theme at the `resources/themes` folder.
### Displaying views
To display a view, just call `view('view_name')` without indicating any reference to the theme.
### Adding assets
To add assets to pages, just include them pointing to their location at the `public` folder.
1\. Add any assets (images, CSS, JS, etc.) for the theme in a specific folder inside the `public` folder.
2\. If you're using a task manager (like [Gulp](http://gulpjs.com/) or [Grunt](http://gruntjs.com/)) it's recommended to add assets at an `assets` folder inside the theme and then move the files to the public location.
```
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.
4\. Views in themes always override shared views.
1. Asset management can be rather awkward, given the views for the theme are outside the `public` folder.
Please see [CHANGELOG.md](CHANGELOG.md).
Found a bug? Please create an issue on the [GitHub project page](https://github.com/intentor/laravel-theme/issues) or send a pull request if you have a fix or extension.
You can also send me a message at support@intentor.com.br to discuss more obscure matters about the component.
Licensed under the [The MIT License (MIT)](http://opensource.org/licenses/MIT). Please see [LICENSE](LICENSE) for more information.