PHPackages                             jasco-b/theme - 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. jasco-b/theme

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

jasco-b/theme
=============

Laravel multi theme library

1.2(5y ago)294MITPHPPHP &gt;=7.0.0

Since Aug 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jasco-b/lara-theme)[ Packagist](https://packagist.org/packages/jasco-b/theme)[ RSS](/packages/jasco-b-theme/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (8)Dependencies (3)Versions (8)Used By (0)

Theme Management for Laravel
============================

[](#theme-management-for-laravel)

Laravel-Theme is a theme management for Laravel 5+, it is the easiest way to organize your skins, layouts and assets.

Usage
-----

[](#usage)

Theme has many features to help you get started with Laravel

- [Installation](#installation)
- [Create new theme](#create-new-theme)
- [Basic usage](#basic-usage)
- [Custom boilerplate](#custom-theme-boilerplate)

Installation
------------

[](#installation)

```
'providers' => [
	...
	 \JascoB\Theme\Providers\ThemeServiceProvider::class,

]
```

Theme also ships with a facade which provides the static syntax for creating collections. You can register the facade in the `aliases` key of your `config/app.php` file.

```
'aliases' => [
	...
	'Theme'=> \JascoB\Theme\Facades\Theme::class,

]
```

Publish config using artisan CLI.

```
php artisan vendor:publish --provider="JascoB\Theme\Providers\ThemeServiceProvider"

```

Create new theme
----------------

[](#create-new-theme)

The first time you have to create theme "default" structure, using the artisan command:

```
php artisan theme:create default

```

This will create the following directory structure:

```
├── public/
    └── themes/
	    └── default/
		    ├── assets
        	    └── config.json

```

To delete an existing theme, use the command:

```
php artisan theme:delete default

```

If you want to list all installed themes use the command:

```
php artisan theme:list

```

You can duplicate an existing theme:

```
php artisan theme:duplicate name new-theme

```

Create from the application without CLI.

```
Artisan::call('theme:create', ['name' => 'foo']);
```

Basic usage
-----------

[](#basic-usage)

To display a view from the controller:

```
namespace App\Http\Controllers;

use Theme;

class HomeController extends Controller {

	public function getIndex()
	{
		return Theme::view('index');
	}
	...
}
```

You can use it in your routes as a middleware

```
Route::get('/', function () {
    //
})->middleware('theme:yourtheme');
```

You can set theme manually:

```
...
Theme::set('themename');

return Theme::view('index');
...
```

To check whether a theme exists.

```
Theme::has('themename');
```

Each theme must come supplied with a manifest file `config.json` stored at the root of the theme, which defines supplemental details about the theme.

```
{
    "name": "Default"
}
```

### Custom Helper functions

[](#custom-helper-functions)

@themeInclude is a blade directive for including sup views eg:

```
## insted of
@include('someview', ['somedata'=>$var])

## use theme campatible
@themeInclude('someview', ['somedata'=>$var] )

```

@themeFirst is blade directive instead of @includeFirst

```
## insted of
@includeFirst(['someview','view-other'], ['somedata'=>$var] )

## use theme campatible
@themeFirst(['someview','view-other'], ['somedata'=>$var] )

```

Package will publish assets folder to public folder as indicated on config file theme.php
In order to get url for current theme use theme\_uri()

```

```

Please place all your assets to assets folder and Correctly change config/theme.php file

Custom theme boilerplate
------------------------

[](#custom-theme-boilerplate)

if you want to change boilerplate you can use

```
php artisan vendor:publish --provider="JascoB\Theme\Providers\ThemeServiceProvider" --tag="template"

```

It will create a fonder on `resources/views/vendor/theme/template`you can make boilerplate there and The package will copy the template from there

Tests
-----

[](#tests)

In order to run test

```
php vendor/bin/phpunit tests

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~8 days

Total

7

Last Release

2064d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/682988?v=4)[joel](/maintainers/jasco)[@jasco](https://github.com/jasco)

---

Top Contributors

[![jasco-b](https://avatars.githubusercontent.com/u/12882799?v=4)](https://github.com/jasco-b "jasco-b (13 commits)")

---

Tags

phplaravelthemelaravel-themelara-theme

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jasco-b-theme/health.svg)

```
[![Health](https://phpackages.com/badges/jasco-b-theme/health.svg)](https://phpackages.com/packages/jasco-b-theme)
```

###  Alternatives

[gehrisandro/tailwind-merge-laravel

TailwindMerge for Laravel merges multiple Tailwind CSS classes by automatically resolving conflicts between them

341682.2k18](/packages/gehrisandro-tailwind-merge-laravel)[qirolab/laravel-themer

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

402240.2k8](/packages/qirolab-laravel-themer)[iteks/laravel-enum

A comprehensive Laravel package providing enhanced enum functionalities, including attribute handling, select array conversions, and fluent facade interactions for robust enum management in Laravel applications.

2516.7k](/packages/iteks-laravel-enum)[salmanzafar/laravel-geocode

A Laravel Library to find Lat and Long of a given Specific Address

153.9k](/packages/salmanzafar-laravel-geocode)

PHPackages © 2026

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