PHPackages                             qirolab/laravel-themer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. qirolab/laravel-themer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

qirolab/laravel-themer
======================

A Laravel theme manager, that will help you organize and maintain your themes inside Laravel projects.

2.4.0(1y ago)402240.2k↑47.5%50[2 PRs](https://github.com/qirolab/laravel-themer/pulls)6MITPHPPHP &gt;=7.1.0CI passing

Since Jan 2Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/qirolab/laravel-themer)[ Packagist](https://packagist.org/packages/qirolab/laravel-themer)[ Docs](https://qirolab.com)[ Fund](https://www.buymeacoffee.com/qirolab)[ RSS](/packages/qirolab-laravel-themer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (29)Used By (6)

Multi theme support for Laravel application
===========================================

[](#multi-theme-support-for-laravel-application)

[![Latest Version on Packagist](https://camo.githubusercontent.com/519d190c0c8c179bea999a950ac5e55b85dc3dbc0a5e25fea198af7da19db8fb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7169726f6c61622f6c61726176656c2d7468656d65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/qirolab/laravel-themer)[![GitHub Tests Action Status](https://camo.githubusercontent.com/854d735f3d6352fd3b6bcd801cd81b8a33e7955d66b5d6373b70071026936f46/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7169726f6c61622f6c61726176656c2d7468656d65722f54657374733f6c6162656c3d5465737473)](https://github.com/qirolab/laravel-themer/actions?query=workflow%3ATests+branch%3Amaster)[![Styling](https://github.com/qirolab/laravel-themer/workflows/Check%20&%20fix%20styling/badge.svg)](https://github.com/qirolab/laravel-themer/actions?query=workflow%3A%22Check+%26+fix+styling%22)[![Psalm](https://github.com/qirolab/laravel-themer/workflows/Psalm/badge.svg)](https://github.com/qirolab/laravel-themer/actions?query=workflow%3APsalm)[![Total Downloads](https://camo.githubusercontent.com/c0848232aa6fd6eb24cc79afa888ea38ba3485b38e4252f5b126a37430f2dcd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7169726f6c61622f6c61726176656c2d7468656d65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/qirolab/laravel-themer)

This Laravel package adds multi-theme support to your application. It also provides a simple authentication scaffolding for a starting point for building a Laravel application. And it also has preset for `Bootstrap`, `Tailwind`, `Vue`, and `React`. So, I believe it is a good alternative to the `laravel/ui` &amp; `laravel/breeze` package.

Features
--------

[](#features)

- Any number of themes
- Fallback theme support (WordPress style); It allows creating a child theme to extend any theme
- Provides authentication scaffolding similar to `laravel/ui` &amp; `laravel/breeze`
- Exports all auth controllers, tests, and other files similar to `laravel/breeze`
- Provides frontend presets for `Bootstrap`, `Tailwind`, `Vue 2`, `Vue 3` and `React`

If you don't want to use auth scaffolding of this package, instead you want to use Laravel Fortify, no problem with that. You can use Laravel Themer with Fortify. Laravel Fortify only gives backend implementation authentication, it does not provide views or frontend presets. So, use Fortify for backend auth and Laravel Themer for views and presets.

Tutorial
--------

[](#tutorial)

Here is the video for **[Laravel Themer Tutorial](https://www.youtube.com/watch?v=Ty4ZwFTLYXE)**.

Installation and setup
----------------------

[](#installation-and-setup)

> ***NOTE:***
>
> Laravel Themer v2.x and the above versions support **Vite**. If you want to use **Laravel Mix** then try **[Laravel Themer v1.7.1](https://github.com/qirolab/laravel-themer/tree/1.7.1 "v1.7.1")**

You can install this package via composer using:

```
composer require qirolab/laravel-themer
```

Publish a configuration file:

```
php artisan vendor:publish --provider="Qirolab\Theme\ThemeServiceProvider" --tag="config"
```

Creating a theme
----------------

[](#creating-a-theme)

Run the following command in the terminal:

```
php artisan make:theme
```

This command will ask you to enter theme name, CSS framework, js framework, and optional auth scaffolding.

[![Create theme](https://camo.githubusercontent.com/474db5f776f6773d065aa09f5a3627f370be141d8b51878fc31801f86c25ec6b/68747470733a2f2f692e696d6775722e636f6d2f4844684f5276312e706e67)](https://camo.githubusercontent.com/474db5f776f6773d065aa09f5a3627f370be141d8b51878fc31801f86c25ec6b/68747470733a2f2f692e696d6775722e636f6d2f4844684f5276312e706e67)

Useful Theme methods:
---------------------

[](#useful-theme-methods)

```
// Set active theme
Theme::set('theme-name');

// Get current active theme
Theme::active();

// Get current parent theme
Theme::parent();

// Clear theme. So, no theme will be active
Theme::clear();

// Get theme path
Theme::path($path = 'views');
// output:
// /app-root-path/themes/active-theme/views

Theme::path($path = 'views', $themeName = 'admin');
// output:
// /app-root-path/themes/admin/views

Theme::getViewPaths();
// Output:
// [
//     '/app-root-path/themes/admin/views',
//     '/app-root-path/resources/views'
// ]
```

Middleware to set a theme
-------------------------

[](#middleware-to-set-a-theme)

Register `ThemeMiddleware` in `app\Http\Kernel.php`:

```
protected $routeMiddleware = [
    // ...
    'theme' => \Qirolab\Theme\Middleware\ThemeMiddleware::class,
];
```

Examples for middleware usage:

```
// Example 1: set theme for a route
Route::get('/dashboard', 'DashboardController@index')
    ->middleware('theme:dashboard-theme');

// Example 2: set theme for a route-group
Route::group(['middleware'=>'theme:admin-theme'], function() {
    // "admin-theme" will be applied to all routes defined here
});

// Example 3: set child and parent theme
Route::get('/dashboard', 'DashboardController@index')
    ->middleware('theme:child-theme,parent-theme');
```

Asset compilation
-----------------

[](#asset-compilation)

To compile the theme assets, first you need to add the following lines in the `scripts` section of the `package.json` file.

```
"scripts": {
    ...

    "dev:theme-name": "vite --config themes/theme-name/vite.config.js",
    "build:theme-name": "vite build --config themes/theme-name/vite.config.js"
}

```

Now, to compile a particular theme run the following command:

```
npm run dev:theme-name

# or

npm run build:theme-name
```

Testing
-------

[](#testing)

```
composer test
```

Support us
----------

[](#support-us)

We invest a lot of resources into video tutorials and creating open-source packages. If you like what I do or if you ever made use of something I built or from my videos, consider supporting us. This will allow us to focus even more time on the tutorials and open-source projects we're working on.

[![Buy Me A Coffee](https://camo.githubusercontent.com/c5379e5ec49de264db8fd9465df9711e2a6db28cec5687ff845ca5830500e92f/68747470733a2f2f692e696d6775722e636f6d2f7a486f776f7a452e706e67)](https://www.buymeacoffee.com/qirolab)

Thank you so much for helping us out! 🥰

[![Spec Coder](https://camo.githubusercontent.com/8bb401f2c52df4de04c96c5450e61946a7fbfd36d407bda0fc77c66dce86716c/68747470733a2f2f692e696d6775722e636f6d2f6c716b743761332e706e67)](https://qirolab.com/spec-coder)

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

Authentication scaffolding stubs and presets are taken from [laravel/ui](https://github.com/laravel/ui), [laravel/breeze](https://github.com/laravel/breeze), and [laravel-frontend-presets/tailwindcss](https://github.com/laravel-frontend-presets/tailwindcss).

- [Harish Kumar](https://github.com/hkp22)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance67

Regular maintenance activity

Popularity56

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Recently: every ~72 days

Total

27

Last Release

446d ago

Major Versions

1.7.1 → 2.0.02022-07-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/409368752f65ba14c0c6bfaabf70353b13096503e1de1e13d3e6aa3899cb13aa?d=identicon)[hkp22](/maintainers/hkp22)

![](https://www.gravatar.com/avatar/4f443ca23815908ed429c01a04b0eb7d1ec7c815967f97b069d87d65210c0040?d=identicon)[qirolab](/maintainers/qirolab)

---

Top Contributors

[![hkp22](https://avatars.githubusercontent.com/u/39181262?v=4)](https://github.com/hkp22 "hkp22 (121 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (6 commits)")

---

Tags

laravellaravel-packagelaravel-themelaravel-themesthemeslaravelthemelaravel-themeqirolab

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/qirolab-laravel-themer/health.svg)

```
[![Health](https://phpackages.com/badges/qirolab-laravel-themer/health.svg)](https://phpackages.com/packages/qirolab-laravel-themer)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[david-griffiths/nova-dark-theme

A dark theme for Laravel Nova

71576.9k](/packages/david-griffiths-nova-dark-theme)[pingpong/themes

Laravel Themes

3023.7k2](/packages/pingpong-themes)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[nedwors/navigator

A Laravel package to ease defining navigation menus

433.1k](/packages/nedwors-navigator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
