PHPackages                             bikmazer/stylist - 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. [Framework](/categories/framework)
4. /
5. bikmazer/stylist

ActiveLibrary[Framework](/categories/framework)

bikmazer/stylist
================

Laravel theming package.

8.0.0(5y ago)014PHPPHP &gt;=7.2

Since Jun 9Pushed 5y agoCompare

[ Source](https://github.com/bikmazer/stylist)[ Packagist](https://packagist.org/packages/bikmazer/stylist)[ RSS](/packages/bikmazer-stylist/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (8)Used By (0)

Stylist
=======

[](#stylist)

About
-----

[](#about)

[![Build Status](https://camo.githubusercontent.com/a2c7d59688e9eb40207668514c721a05231b8f330d7bf4ce1aaecd9492803208/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f666c6f6174696e67706f696e74736f6674776172652f7374796c6973742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/floatingpointsoftware/stylist)

Stylist is a Laravel 5.5+ compatible package for theming your Laravel applications.

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

[](#installation)

Via the usual composer command:

```
composer require floatingpoint/stylist

```

Then, make sure the Stylist service provider is made available to your application by updating your config/app.php:

```
'FloatingPoint\Stylist\StylistServiceProvider',

```

You're now ready to go!

Setting up a theme
------------------

[](#setting-up-a-theme)

In order for Stylist to start using themes, you must register at least one theme with the package, and activate it.

```
Stylist::registerPath('/absolute/path/to/theme', true);

```

Your theme should contain a theme.json file, which contains some basic information:

```
{
    "name": "My theme",
    "description": "This is my theme. There are many like it, but this one is mine."
}

```

Only one theme can be activated at a time, so multiple calls to activate themes, will simply deactivate the previously activated theme.

So, what happens when you now load views?

How Stylist works
-----------------

[](#how-stylist-works)

Everytime you register a new theme and activate it, Stylist then becomes aware of a new location to search for views, stylesheets, javascripts and image files. Stylist has a few opinions of how to structure your theme directories as well. The reason for this is so that every theme follows the same approach. For example, when you point Stylist to your theme directory, it should have the following directories (if it needs them):

```
/public/stylesheets
/public/javascripts
/public/images
/views/

```

Then, when you make calls like the following:

```
return View::make('layout.application');

```

It'll look in your theme's directory: /views/layout/ for application.blade.php. Simple huh?

When dealing with assets, Stylist requires the Illuminate\\Html library, but instead of using the HTML class, you use Stylist's Theme facade:

```
{{ Theme::image('path/to/image.png') }}

```

This will look for the image in your theme's directory first and foremost: /public/themes/active-theme/images/path/to/image.png

This same approach is applied to your styles, js and any other static assets. Whenever you wish to use theme assets, make sure you use the Theme class.

This means that when you make a call to say, Theme::image, the output url in your HTML will actually look like the following:

```
/themes/active-theme/images/path/to/image.png

```

Of course, if you don't want Stylist to manage that for you, simply use the usual HTML facade.

There's one step we're still missing - and that's the publishing of your theme assets. This isn't a necessary step - you can easily just copy your theme's assets from it's directory, into the appropriate directory in the public directory in Laravel 5. You simply need to ensure that before you publish, your themes are available and registered. Service providers are a great place to do this.

```
public function register()
{
    Stylist::registerPaths(Stylist::discover('/path/to/my/themes'));
}

```

Then simply run the publish command:

```
php artisan stylist:publish

```

Or, if you want to publish a select theme:

```
php artisan stylist:publish ThemeName

```

You'll then have your theme's assets published to their associated directories. It's important to note that the returned array must contain array elements that point to the the THEME directory, not the theme's ASSETS directories. This is because stylist will try to work with the theme and its json file, and publish the required files.

Theme inheritance
-----------------

[](#theme-inheritance)

Themes can have parent themes. What does this mean? It means that you can request a view, and Stylist will first look to the child theme that you have activated, and work its way up a tree. This is really great if you like a particular theme but want to customise just a single view file.

### Defining a parent

[](#defining-a-parent)

It's very easy to define a parent for a theme. You simply define the parent theme inside your theme.json:

```
"parent": "Another theme"

```

This will ensure that Stylist will first look in your theme's directories for files and assets, and then look in the parent's theme directories. If your theme's parent also has a parent, then it will continue looking up the tree until it finds the file.

Parents do not need to be activated for your theme to make use of them. Only your theme needs to be activated. However, they do need to be registered. This may be handled by the package that manages your theme, or you can register it yourself.

### Stylesheets

[](#stylesheets)

Themes can also inherit stylesheets. In order to do this, a child theme must have a stylesheet name that is identical to its parent. If this is the case, then the parent CSS file will be loaded first, followed by the child's css theme. This makes it very easy to create "skins" for themes, by simply overloading certain styles.

Helper methods
--------------

[](#helper-methods)

Stylist has a few helper methods as well, to ease development.

```
Theme::url()

```

When used in a view, this method would return the relative path to a theme's public directory. You can also use it to access any file:

```
Theme::url('favicon.ico')

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 82.5% 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 ~352 days

Recently: every ~484 days

Total

7

Last Release

1871d ago

Major Versions

0.5.0 → 1.0.02020-03-13

1.0.0 → 8.0.02021-03-24

PHP version history (2 changes)0.1PHP &gt;=5.5.0

1.0.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/e01e0db8b370ba27fcfbc694aa98b179f0c682b62b629464d11f7f5c53693e0c?d=identicon)[bikmazer](/maintainers/bikmazer)

---

Top Contributors

[![kirkbushell](https://avatars.githubusercontent.com/u/65171?v=4)](https://github.com/kirkbushell "kirkbushell (85 commits)")[![darron1217](https://avatars.githubusercontent.com/u/8064923?v=4)](https://github.com/darron1217 "darron1217 (12 commits)")[![bikmazer](https://avatars.githubusercontent.com/u/7480031?v=4)](https://github.com/bikmazer "bikmazer (2 commits)")[![to-kn](https://avatars.githubusercontent.com/u/1778428?v=4)](https://github.com/to-kn "to-kn (2 commits)")[![capham](https://avatars.githubusercontent.com/u/1766199?v=4)](https://github.com/capham "capham (1 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bikmazer-stylist/health.svg)

```
[![Health](https://phpackages.com/badges/bikmazer-stylist/health.svg)](https://phpackages.com/packages/bikmazer-stylist)
```

###  Alternatives

[laravel/socialite

Laravel wrapper around OAuth 1 &amp; OAuth 2 libraries.

5.7k96.9M672](/packages/laravel-socialite)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k84.2M224](/packages/laravel-horizon)[laravel/ui

Laravel UI utilities and presets.

2.7k134.9M597](/packages/laravel-ui)[laravel/jetstream

Tailwind scaffolding for the Laravel framework.

4.1k19.8M136](/packages/laravel-jetstream)[internachi/modular

Modularize your Laravel apps

1.1k662.4k8](/packages/internachi-modular)[illuminate/routing

The Illuminate Routing package.

1238.6M2.2k](/packages/illuminate-routing)

PHPackages © 2026

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