PHP code example of bkeremm / laravel-theme
1. Go to this page and download the library: Download bkeremm/laravel-theme library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bkeremm / laravel-theme example snippets
Cankod\Theme\ServiceProvider::class,
'Theme' => Cankod\Theme\Facade::class,
<link rel="stylesheet" href="{{ Theme::asset('app.css') }}">
<script type="javascript" src="{{ Theme::asset('app.js') }}">
Theme::assetLink('app.css'); // Output: <link rel="stylesheet" href="/themes/default/css/app.css">
Theme::assetLink('app.js');
'current_theme' => 'default',
'views_folder' => [
'layout' => 'layouts',
'component' => 'components',
],
'views_blade' => [
'index' => 'index',
'header' => 'header',
'footer' => 'footer',
'layout' => 'main',
],
'webpack' => [
'folder' => [
'js' => 'js',
'css' => 'sass',
],
'file' => [
'css' => 'app.scss',
'variable' => '_variables.scss',
'js' => 'app.js',
'bootstrap' => 'bootstrap.js',
]
],
'resource_path' => 'themes',
'public_path' => 'themes',
'current_theme' => 'theme_name',
bash
php artisan vendor:publish --tag=theme
bash
php artisan theme:generate