- How do I install and set up Themevel in a Laravel application?
- Install it with composer require shipu/themevel, then publish the config and assets using the package's vendor:publish tag. On modern Laravel the service provider is auto-discovered, so you mainly need to set your themes path and default_theme in the published config file. After that, create a theme directory containing your views and assets and activate it. A working two-theme proof of concept is typically a one to three day task for one developer.
- Does Themevel support Laravel 11, Laravel 12, and PHP 8.3?
- The last release was August 2023, so Laravel 11 and 12 plus PHP 8.3 support is not guaranteed out of the box. Check the composer.json constraints against your target framework and PHP versions before committing. Because the package depends on Laravel view-finder and asset-publishing internals, test those integration points first. If constraints block you, the CC0-1.0 license makes forking straightforward.
- How does Themevel resolve theme views and fall back to default views?
- Themevel overlays the active theme's view path onto Laravel's view finder, so controllers keep returning the same view names and the package decides where to look. If a view is missing from the active theme it falls back to the base resources/views directory. This keeps your application code completely unaware of which theme is rendering. Just be aware that silent fallbacks can hide typos in theme view names.
- Can I switch themes per request or per tenant with Themevel?
- Yes, the package supports switching the active theme at runtime, and middleware is the natural place to pick a theme based on domain, tenant, or user preference. Wrap the vendor facade in your own ThemeResolver contract so application code never calls the package API directly. That wrapper also lets you swap in an in-house resolver later with a contained diff. Start with a config-driven theme registry rather than database-backed theme CRUD.
- Is Themevel safe to use with Laravel Octane and queue workers?
- The active theme is effectively ambient request state, so long-lived workers can leak a theme from one request or tenant into the next. Under Octane you must reset the theme explicitly at the start or end of every request, and avoid activating themes inside queued jobs that share a worker. This is the highest-severity correctness risk with the package. Add an Octane request-isolation test to your suite before shipping.
- How do per-theme assets work with Vite or Mix in Themevel?
- Themevel resolves theme asset URLs, but it does not understand your Vite or Mix manifest per theme. In practice you will need a thin adapter that maps the active theme to the correct manifest and CDN path rather than relying on the package's default asset helper. Plan the asset pipeline as part of the spike, not as an afterthought. Also confirm asset publishing works non-interactively in CI.
- How does Themevel interact with view:cache and config:cache?
- Compiled Blade views and cached config are per-environment artefacts, and the active theme changes which files the view finder resolves. You need an explicit invalidation story: rebuild view caches after deploying or adding a theme, and re-run config:cache whenever the theme registry changes. Test the missing-theme fallback, a view:cache rebuild, and a config:cache after adding a theme. Skipping this leaves you with stale or missing views in production.
- Are customer-uploaded themes a security risk with Themevel?
- Yes. Themes contain Blade templates, which are executable PHP, so any theme a customer or third party can author is effectively code running on your server. Treat theme upload as a code deployment with review, signing, and a restricted deployment path rather than a content upload. If you cannot enforce that workflow, keep theming internal-only. This decision should be made before you adopt the package.
- Is Themevel still maintained, and what license does it use?
- Themevel has roughly 345 GitHub stars, a single maintainer, and a last release in August 2023. It is licensed CC0-1.0, which is maximally permissive and good for forking or vendoring, but it signals no commercial support path and no warranty. Assume you own the code from the day you adopt it, and name an internal owner. Pin the Laravel minor version and add it to your upgrade test matrix.
- When should I avoid Themevel and use an alternative approach?
- Skip it if your front end is Inertia, React, Vue, or Livewire-heavy, or if theming really just means swapping a few CSS variables, because the package then adds indirection without buying view or asset resolution. It fits best for Blade-first server-rendered apps with genuine per-brand or per-tenant themes, such as customer portals or multi-brand marketing sites. If you only need a single global theme, a simple config flag is usually enough. For white-label tenants at scale, compare it against a custom ThemeResolver contract that you fully control.