appdezign/lara-pro-demo-theme
Demo theme for Lara Pro CMS 10, built on Laravel. A child theme of the Base Theme, showcasing Lara CMS styling and structure for development and customization. Developer guide: https://docs.laracms.nl/
Prerequisites:
Installation:
composer require appdezign/lara-pro-demo-theme
php artisan vendor:publish --provider="Appdezign\LaraProDemoTheme\ThemeServiceProvider" --tag="public"
php artisan vendor:publish --provider="Appdezign\LaraProDemoTheme\ThemeServiceProvider" --tag="config"
Enable the Theme:
config/cms.php:
'theme' => 'lara-pro-demo-theme',
php artisan migrate
First Demo Setup:
php artisan db:seed --class=LaraProDemoThemeSeeder
php artisan serve
http://localhost:8000.Where to Look First:
resources/views in the theme’s vendor directory for Blade templates.resources/css/app.css for customizations.Child Theme Overrides:
resources/themes/your-theme.resources/views/layouts/app.blade.php) or assets (e.g., resources/css/your-theme.css).resources/themes/your-theme/
├── assets/
│ ├── css/
│ └── js/
├── views/
│ ├── layouts/
│ └── partials/
└── config/
Dynamic Content via Lara CMS:
Page, Post) to manage demo content dynamically.@foreach(\App\Models\Page::where('template', 'demo-home')->get() as $page)
{{ $page->content }}
@endforeach
Asset Customization:
npm run dev
php artisan vendor:publish --tag=lara-pro-demo-theme-public
Multi-Language Support:
@lang directive or Laravel’s trans() helper.Demo Data Management:
// In a custom seeder
\App\Models\Page::create([
'title' => 'Demo Home',
'template' => 'demo-home',
'content' => '<h1>Welcome to our demo!</h1>',
]);
Rapid Prototyping:
Client-Specific Demos:
resources/css/client-branding.css) to inject logos/colors.client1-demo.yoursite.com).Internal Tooling:
Laravel Ecosystem:
Third-Party Services:
app.blade.php.CI/CD:
# .github/workflows/deploy-demo.yml
name: Deploy Demo
on:
push:
branches: [ demo ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
- run: composer install
- run: npm install && npm run build
- run: php artisan migrate --env=demo
- run: php artisan demo:deploy # Custom Artisan command
Performance Optimization:
php artisan cache:clear) and opcache.// tailwind.config.js
module.exports = {
mode: 'jit',
}
<img src="{{ asset('demo-image.jpg') }}" loading="lazy" alt="Demo">
Lara CMS Dependency:
// app/Http/Kernel.php
protected $middleware = [
// Disable Lara CMS middleware if not needed
// \Appdezign\LaraCms\Http\Middleware\CheckForMaintenanceMode::class,
];
Template Override Conflicts:
resources/views/vendor/lara-cms/overrides/) or consult the Lara CMS docs for safe hooks.Asset Compilation:
node_modules is installed and rebuild:
npm install
npm run dev
Database Schema Mismatches:
Livewire/Filament Updates:
composer.json or use package aliases.Caching Quirks:
php artisan view:clear
php artisan cache:clear
php artisan config:clear
Tailwind Config Conflicts:
// tailwind.config.js
module.exports = {
presets: [require('lara-pro-demo-theme/tailwind.config')],
content: [
'./resources/**/*.blade.php',
'./vendor/appdezign/lara-pro-demo-theme/resources/**/*.blade.php',
],
}
Template Debugging:
// config/view.php
'debug' => env('APP_DEBUG', true),
@dd() in Blade templates to inspect variables.**Lara
How can I help you explore Laravel packages today?