PHPackages                             alexwhitman/view-themes - 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. [Templating &amp; Views](/categories/templating)
4. /
5. alexwhitman/view-themes

AbandonedLibrary[Templating &amp; Views](/categories/templating)

alexwhitman/view-themes
=======================

Provides support for themed views in Laravel.

1.2.0(12y ago)15629MITPHP &gt;=5.3.0

Since Oct 10Compare

[ Source](https://github.com/alexwhitman/laravel-view-themes)[ Packagist](https://packagist.org/packages/alexwhitman/view-themes)[ Docs](http://github.com/alexwhitman/laravel-view-themes)[ RSS](/packages/alexwhitman-view-themes/feed)WikiDiscussions Synced 2w ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Laravel View Themes
===================

[](#laravel-view-themes)

View themes is a simple package to provide themed view support to Laravel.

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

[](#installation)

Add `alexwhitman/view-themes` to the `require` section of your `composer.json` file.

`"alexwhitman/view-themes": "1.2.x"`

Run `composer update` to install the latest version.

Setup
-----

[](#setup)

This package extends Laravels built in `ViewServiceProvider`, so that provider must be replaced in `app/config/app.php`. Replace the instance of `'Illuminate\View\ViewServiceProvider',` with `'AlexWhitman\ViewThemes\ViewThemesServiceProvider',`.

Configuration
-------------

[](#configuration)

The default settings are for the themes to be in a `themes` directory in `app/` with the default theme called `default`.

```
app/
    themes/
        default/
            views/

```

To change these defaults the package config will need to be published with `artisan config:publish alexwhitman/view-themes`. The new config file, `app/config/packages/alexwhitman/view-themes/config.php`, can then be customised as required.

Usage
-----

[](#usage)

A standard call to `View::make('index')` will look for an index view in `app/themes/default/views/`. However, if a theme is specified with `$app['view.finder']->setCurrentTheme('my-theme');` prior to calling `View::make()` then the view will first be looked for in `app/themes/my-theme/views`. If the view is not found for the current theme the default theme will then be searched.

### Facade

[](#facade)

The `ViewTheme` facade can also be used if preferred `ViewTheme::setCurrentTheme('my-theme')` by adding an entry for `AlexWhitman\ViewThemes\ThemeFacade` to `app/config/app.php`.

Example
-------

[](#example)

Given a directory structure of

```
app/
    themes/
        default/
            views/
                layout.blade.php
                admin.blade.php
        my-theme/
            views/
                layout.blade.php

```

```
View::make('layout'); // Loads app/themes/default/views/layout.blade.php

$app['view.finder']->setCurrentTheme('my-theme');

View::make('layout'); // Loads app/themes/my-theme/views/layout.blade.php
View::make('admin'); // Loads app/themes/default/views/layout.blade.php

```

Changelog
---------

[](#changelog)

1.2.0
-----

[](#120)

- Update for Laravel 4.2

### 1.1.2

[](#112)

- Add function to get current theme path

### 1.1.1

[](#111)

- Clear previous paths on initialise

### 1.1.0

[](#110)

- Update for Laravel 4.1

### 1.0.0

[](#100)

- Initial release

###  Health Score

30

—

LowBetter than 61% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~61 days

Total

5

Last Release

4444d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/422013?v=4)[Alex Whitman](/maintainers/alexwhitman)[@alexwhitman](https://github.com/alexwhitman)

---

Tags

laravelviewthemes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alexwhitman-view-themes/health.svg)

```
[![Health](https://phpackages.com/badges/alexwhitman-view-themes/health.svg)](https://phpackages.com/packages/alexwhitman-view-themes)
```

###  Alternatives

[moonshine/moonshine

Laravel administration panel

1.3k268.2k88](/packages/moonshine-moonshine)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

731189.9k16](/packages/tallstackui-tallstackui)[hasinhayder/tyro-dashboard

Tyro Dashboard - Beautiful admin dashboard for managing Tyro roles, privileges, users, and settings

5495.1k](/packages/hasinhayder-tyro-dashboard)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9922.4M146](/packages/roots-acorn)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)

PHPackages © 2026

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