Download the PHP package ayra/laravel-themes without Composer
On this page you can find all versions of the php package ayra/laravel-themes. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ayra/laravel-themes
More information about ayra/laravel-themes
Files in ayra/laravel-themes
Package laravel-themes
Short Description A powerful theme management system for Laravel 12.x that helps you organize themes, layouts, assets, and widgets efficiently. Based on teepluss/theme with modern Laravel compatibility.
License MIT
Homepage https://github.com/ayra/laravel-themes
Informations about the package laravel-themes
Laravel Themes - Theme Management System for Laravel 12.x
A powerful and modern theme management system for Laravel 12.x that helps you organize themes, layouts, assets, and widgets efficiently. This package is based on teepluss/theme but completely rewritten for modern Laravel compatibility.
✨ Features
- 🎨 Multi-Theme Support: Create and manage multiple themes with ease
- 🏗️ Flexible Layouts: Support for multiple layouts per theme
- 📦 Asset Management: Built-in asset pipeline with dependency management
- 🧩 Widget System: Create reusable widgets for your themes
- 🍞 Breadcrumb Management: Easy breadcrumb generation and customization
- 🔧 Artisan Commands: Powerful CLI tools for theme management
- 🎯 Blade Directives: Custom Blade directives for theme functionality
- 🚀 Laravel 12 Ready: Full compatibility with the latest Laravel version
- 📱 Middleware Support: Route-based theme switching
- 🎭 Partial Views: Modular view system with partials and sections
- 🔄 Theme Switching: Session/cookie-based theme persistence
- 📤 Export/Import: Backup and share themes easily
- 💾 Auto-Backup: Automatic theme backup with rotation
- 🌐 CDN Support: Built-in CDN integration for assets
- 📊 Theme Statistics: Get detailed theme information
- 👀 Theme Preview: Preview themes via URL parameters
- 🎛️ Conditional Assets: Load assets based on conditions
- 🔒 Asset Integrity: SRI support for security
🚀 Quick Start
Requirements
- PHP 8.2 or higher
- Laravel 12.x
Installation
-
Install via Composer:
-
Publish Configuration:
-
Add to .env:
- Create Your First Theme:
📚 Documentation
Table of Contents
- Basic Usage
- Theme Management
- Asset Management
- Layouts & Views
- Widgets
- Breadcrumbs
- Blade Directives
- Configuration
- Artisan Commands
- Advanced Features
- Theme Switching
- Export & Import
- Asset Optimization
- Theme Preview
🎯 Basic Usage
Setting Up a Theme
Controller Integration
🎨 Theme Management
Creating Themes
Theme Structure
Theme Manifest (theme.json)
🔄 Theme Switching
Session/Cookie Based Switching
Theme Preview via URL
Route-Based Theme Switching
📤 Export & Import
Export Themes
Import Themes
Auto-Backup System
📦 Asset Management
Basic Asset Management
Advanced Asset Features
Asset Containers
Inline Assets
🏗️ Layouts & Views
Layout System
View Rendering
Partials
🧩 Widgets
Creating Widgets
Widget Class
Using Widgets
🍞 Breadcrumbs
Creating Breadcrumbs
Custom Templates
🎭 Blade Directives
Available Directives
🛠️ Helper Functions
Date & Time Helpers
Formatting Helpers
Security & Privacy Helpers
Device & Browser Detection
File & Media Helpers
Validation Helpers
UI & Design Helpers
Testing & Development Helpers
SEO & Meta Helpers
Utility Helpers
🚀 Advanced Features
Theme Statistics
Theme Preview URLs
Conditional Asset Loading
Asset Optimization
Theme Switching Examples
Export/Import Examples
Advanced Asset Management
📚 Complete Helper Function Reference
Date & Time Functions
format_date($date, $format, $timezone)
- Format date with custom formathuman_date($date)
- Get human readable datetime_ago($timestamp)
- Get time ago from timestampis_weekend($date)
- Check if date is weekendis_business_day($date)
- Check if date is business dayget_age($birthDate)
- Calculate age from birth date
Formatting Functions
format_bytes($bytes, $precision)
- Format bytes to human readableformat_number($number, $precision)
- Format number with abbreviationsformat_currency($amount, $currency, $locale)
- Format currencyslugify($text, $separator)
- Create URL-friendly slugtruncate($text, $length, $ending)
- Truncate text to lengthword_limit($text, $limit, $ending)
- Limit text to word counthighlight_search($text, $search, $highlight)
- Highlight search terms
Security Functions
generate_password($length, $special_chars)
- Generate random passwordgenerate_token($length)
- Generate random tokenmask_email($email, $mask)
- Mask email for privacymask_phone($phone, $mask)
- Mask phone for privacyprotectEmail($email)
- Protect email from bots
Device Detection Functions
is_mobile()
- Check if request is from mobileis_tablet()
- Check if request is from tabletis_desktop()
- Check if request is from desktopget_browser_info()
- Get browser informationget_client_ip()
- Get client IP addressget_country_code($ip)
- Get country code from IP
File Functions
sanitize_filename($filename)
- Sanitize filenameget_file_extension($filename)
- Get file extensionis_image($filename)
- Check if file is imageis_video($filename)
- Check if file is videois_audio($filename)
- Check if file is audioget_file_size($filepath)
- Get file size
Validation Functions
validate_email($email)
- Validate email addressvalidate_url($url)
- Validate URLvalidate_ip($ip)
- Validate IP address
UI Functions
get_random_color()
- Get random colorget_contrast_color($hexColor)
- Get contrasting colorget_emoji($name)
- Get emoji by nameget_flag_emoji($countryCode)
- Get country flag emojiget_gravatar_url($email, $size)
- Get Gravatar URL
Utility Functions
get_ordinal($number)
- Get ordinal suffixget_plural($singular, $count)
- Get plural formget_random_quote()
- Get random inspirational quoteget_random_name()
- Get random name for testingget_random_email()
- Get random email for testingget_random_company()
- Get random company for testing
SEO Functions
meta_init()
- Print common meta tagsmeta_tags($tags)
- Generate meta tags from arrayseo_tags($title, $description, $keywords, $author, $image, $url)
- Generate SEO meta tags
🎯 Usage Examples in Themes
In Theme Configuration
In Blade Templates
In Controllers
This comprehensive set of helper functions makes your Laravel Themes package incredibly powerful and user-friendly! Users can now build sophisticated themes with minimal custom code, using these built-in utilities for common tasks.
🎓 How to Use - Complete Tutorial
🚀 Getting Started - Step by Step
1. Installation & Setup
2. Basic Theme Structure
After running php artisan theme:create default
, you'll have:
3. Create Your First Layout
4. Create Header Partial
5. Create Main Content Section
6. Create Footer Partial
7. Create Your First View
8. Configure Your Theme
9. Create Your Controller
10. Add Routes
🎨 Advanced Theme Features
Creating Multiple Themes
Theme Switching in Real-Time
Creating Widgets
Using Widgets in Your Views
🔧 Asset Management Examples
Advanced Asset Configuration
Asset Containers
📱 Responsive Design with Device Detection
Device-Specific Content
Device-Specific Assets
🎯 Real-World Use Cases
E-commerce Theme
Blog Theme
Corporate Theme
🚀 Performance Optimization
Asset Optimization
Conditional Loading
🔒 Security Features
Email Protection
Asset Integrity
📊 Monitoring & Analytics
Theme Usage Statistics
🎨 Customization Tips
Creating Custom Helpers
Extending Theme Classes
This comprehensive tutorial shows you exactly how to use every feature of the Laravel Themes package! From basic setup to advanced customization, you now have everything you need to build amazing, responsive themes.