This Package is only for Laravel 5+
Pull in via composer
{
"require": {
"bkoetsier/theme": "dev-master"
}
}
// app/config/app.php
'providers' => [
'...',
'Bkoetsier\Theme\ThemeServiceProvider',
];
As default, this packages expects your themes placed in
LARAVEL-ROOT/resources/views/
If you want to override it, you should publish the config with
php artisan vendor:publish --provider="Bkoetsier\Theme\ThemeServiceProvider"
You can modify the themes-root in the new app/config/themes.php.
This package provides an additional template variable, to define various HTML- elements Following are the functions that can be called on the HtmlHead-Facade:
- stylesheet($stylesheetUrl, $media = null)
- link($rel, $href, $type = null, $media = null)
- canonical($href)
- meta($name, $content)
- robots($index = true, $follow = true)
- title($title)
To render the HtmlHead-Collection you have to echo it with unescaping blade-tags (default: {!! $HtmlHead !!}} ) in your , so
be careful what data should be set via the HtmlHead.