PHPackages                             brilliant-portal/framework - 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. brilliant-portal/framework

ActiveLibrary[Framework](/categories/framework)

brilliant-portal/framework
==========================

BrilliantPortal is an opinionated Laravel preset.

4.0.0(1y ago)02.9kMITPHPPHP ^8.2

Since May 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Brilliant-Portal/Framework)[ Packagist](https://packagist.org/packages/brilliant-portal/framework)[ Docs](https://github.com/Brilliant-Portal/Framework)[ RSS](/packages/brilliant-portal-framework/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelogDependencies (12)Versions (49)Used By (0)

\[TOC\]

BrilliantPortal
===============

[](#brilliantportal)

BrilliantPortal is an opinionated Laravel preset.

It provides starter team and user models, simplified team management, and basic API endpoints.

Out of the box, Jetstream assumes that every user will have a personal team and perhaps be invited to other teams. BrilliantPortal Framework removes the assumption that all users will have a personal team. See [usage](#usage) for more information.

BrilliantPortal Framework also installs a set of tests for features it provides.

PHP Support Matrix
------------------

[](#php-support-matrix)

PHP VersionVersion&gt; 8.01.x.x7.40.1.xInstallation
------------

[](#installation)

Install the package via composer with a custom repository.

1. Install the app:

```
# Require the framework.
composer require brilliant-portal/framework

# Run installation steps.
php artisan brilliant-portal:install
# Available options:
# --stack=livewire|inertia (default livewire)
# --teams (default disabled)
# --api (default disabled)
# --with-airdrop=true (default enabled)
```

You can publish the config file with:

```
php artisan vendor:publish --provider="BrilliantPortal\Framework\FrameworkServiceProvider" --tag="framework-config"
```

This is the contents of the published config file:

```
return [

    'api' => [
        'version' => env('BPORTAL_FRAMEWORK_API_VERSION', 'v1'), // API versioning.
    ],

    'telescope' => [
        'prune' => [
            'hours' => env('TELESCOPE_PRUNE_HOURS', 48), // Prune entries older than this many hours.
        ],
    ],
];
```

Updating
--------

[](#updating)

When updating BrilliantPortal Payments, you may wish to run `php artisan brilliant-portal-payments:install-tests` to install any updated tests into your app.

Customization
-------------

[](#customization)

### Branding

[](#branding)

To customize the branding, run this command and modify the new files in your application:

```
php artisan brilliant-portal:publish-branding
```

### Views

[](#views)

To publish all views provided by BrilliantPortal Framework, run this command and modify the new files in your application:

```
php artisan vendor:publish --tag brilliant-portal-framework-views
```

### BetterUptime

[](#betteruptime)

See  for documentation.

Usage
-----

[](#usage)

### Permissions

[](#permissions)

Add the `HasTeamPermission` middleware to routes that require a specific permission as defined in your `JetstreamServiceProvider`:

```
# Routes file in your app.
use BrilliantPortal\Framework\Http\Middleware\HasTeamPermission;

Route::middleware(['auth:sanctum', HasTeamPermission::class.':create'])
    ->post(/* any endpoint where the user must have the `create` permission on their current team */);
```

### Teams

[](#teams)

Add the `EnsureHasTeam` middleware to any routes that require a team. If the user does not have a team, they will be redirected to a screen prompting them to create a team.

```
# Routes file in your app.
use BrilliantPortal\Framework\Http\Middleware\EnsureHasTeam;

Route::middleware(['auth:sanctum', EnsureHasTeam::class])
    ->get('/team/settings/', function () {
        //
    });
```

Screenshot of creating a new team:

[![creating a team](documentation/img/team-create.png)](documentation/img/team-create.png)

Screenshot of message for joining an existing team:

[![joining a team](documentation/img/team-join.png)](documentation/img/team-join.png)

### Users

[](#users)

#### Administrators

[](#administrators)

BrilliantPortal Framework adds an `is_super_admin` column to the `users` table and model. By default, it is set to `false`.

Super-admins have privileges to do **anything** in the app, so use these permissions carefully.

The `super-admin` capability can be used in authorization checks to determine if a user is a super-admin:

```
if (Auth::user()->can('super-admin')) {
    // User is super-admin.
}
```

Add the `SuperAdmin` middleware to any routes that require super-admin access. If the user is not a super-admin, they will receive a `403 Forbidden` response.

```
# Routes file in your app.
use BrilliantPortal\Framework\Http\Middleware\SuperAdmin;

# Using class name
Route::middleware(['auth:sanctum', SuperAdmin::class])
    ->get('/admin/dashboard/', function () {
        //
    });

# Using ability
Route::middleware(['auth:sanctum', 'can:super-admin'])
    ->get('/admin/dashboard/', function () {
        //
    });
```

#### Passwords

[](#passwords)

BrilliantPortal Framework sets some default password complexity requirements. See the [Laravel documentation](https://laravel.com/docs/8.x/validation#validating-passwords) for more information.

- Production environments: minimum 8 characters, mixed case, must not exist in known breaches
- Non-production environments: minimum 8 characters

#### Individual Name Fields

[](#individual-name-fields)

The `\BrilliantPortal\Framework\Traits\HasIndividualNameFields` trait may be used on a `User` model to indicate that the user table has distinct `first_name` and `last_name` fields rather than the standard `name` field that Laravel provides.

### Components

[](#components)

Several handy components are provided out of the box:

```
{{-- Headers --}}
I’m an h1
I’m an h2
I’m an h3
I’m an h4
I’m an h5
I’m an h6

{{-- Buttons --}}

    normal
    success
    danger
    disabled

{{-- Pills (Hardcoded) --}}
Active
Complete
Inactive
On Hold
Pending

{{-- Pills (Dynamic) --}}
@php
    switch ($status) {
        case 'special':
            $pillSlug = 'something-else';
            break;

        default:
            $pillSlug = $status;
            break;
    }

    $pillName = 'brilliant-portal-framework::pills.'.$pillSlug;
@endphp

    {{ $status->label }}

```

```
// Pills (as a view).
return view('brilliant-portal-framework::components.pills.active', ['slot' => $value]);
```

Example screenshot:

[![components](documentation/img/components.png)](documentation/img/components.png)

To customize these, see [publishing views](#views).

Search Engine Optimization
--------------------------

[](#search-engine-optimization)

This package uses the [Spatie Laravel Robots Middleware package](https://github.com/spatie/laravel-robots-middleware) to prove `x-robots-tag` headers.

To use this, add the `\BrilliantPortal\Framework\Http\Middleware\RobotsMiddleware` class to your app’s `bootstrap/app.php` file:

```
    ->withMiddleware(function (Middleware $middleware) {
-        //
+        $middleware->append([
+            RobotsMiddleware::class,
+        ]);
    })
```

You may use the `SEARCH_ENGINES_SHOULD_INDEX` and/or `SEARCH_ENGINES_BLOCK_PATTERNS` env variables to control access, or copy the `vendor/brilliant-portal/framework/src/Http/Middleware/RobotsMiddleware.php` file into your app and tweak the logic.

```
SEARCH_ENGINES_SHOULD_INDEX=false # by default, is true only in production environment
SEARCH_ENGINES_BLOCK_PATTERNS="login,two-factor.*,admin.*" # comma-separated string of route names; wildcards are supported

```

API
---

[](#api)

### Admin Endpoints

[](#admin-endpoints)

BrilliantPortal Framework provides endpoints for managing teams and users.

See `/dashboard/api-documentation` for details.

The admin endpoints require a super-admin or these explicit permissions (to use these, add them to your app’s `app/Providers/JetstreamServiceProvider.php` for the appropriate role(s)):

- `admin:create`
- `admin:read`
- `admin:update`
- `admin:delete`

### Generic Endpoints

[](#generic-endpoints)

BrilliantPortal Framework provides a generic endpoint for managing any model in the app other than teams and users.

See `/dashboard/api-documentation` for details.

This is intended for simple API integrations where it’s not worth the time to build a full set of endpoints and documentation. The `type` URL parameter indicates which model to use.

You should [create policies](https://laravel.com/docs/master/authorization#creating-policies) for each model and add them to your `app/Providers/AuthServiceProvider.php` file.

For ease of use, you can extend `BrilliantPortal\Framework\Policies\BasePolicy.php` and use `return $this->checkTeamOwnership($user, $model, $action);`. See `BrilliantPortal\Framework\User.php` for an example.

### Creating New Endpoints

[](#creating-new-endpoints)

You should [create policies](https://laravel.com/docs/master/authorization#creating-policies) for each model and add them to your `app/Providers/AuthServiceProvider.php` file.

For ease of use, you can extend `BrilliantPortal\Framework\Policies\BasePolicy.php` and use `return $this->checkTeamOwnership($user, $model, $action);`. See `BrilliantPortal\Framework\User.php` for an example.

Feel free to copy `BrilliantPortal\Framework\Http\Controllers\Api\Admin\User` and use it as a starting point for your custom API controllers. This extends `BrilliantPortal\Framework\Http\Controllers\Api\Controller`, which provides default authorization policy. It also provides example OpenAPI route annotations.

See `brilliant-portal/framework/src/OpenApi` for example OpenAPI request, response, and schema files, and  for documentation.

You may also use or extend `BrilliantPortal\Framework\Http\Resources\DataWrapCollection` to wrap model index responses and `BrilliantPortal\Framework\Http\Resources\JsonResource` for single model responses.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

License
-------

[](#license)

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

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance42

Moderate activity, may be stable

Popularity16

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~49 days

Total

47

Last Release

464d ago

Major Versions

1.17.1 → 2.0.02023-09-18

1.18.0 → 2.1.02023-11-06

2.1.4 → 3.0.02024-07-19

2.1.5 → 3.0.12024-07-19

3.0.1 → 4.0.02025-01-31

PHP version history (3 changes)0.0.1PHP ^7.4

1.0.0PHP ^8.0

4.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/8026272df856a5afa94a27a51ce9f775c81b6556dd33378e8489330770353f67?d=identicon)[brilliantpackages](/maintainers/brilliantpackages)

---

Top Contributors

[![andrewminion-luminfire](https://avatars.githubusercontent.com/u/47227887?v=4)](https://github.com/andrewminion-luminfire "andrewminion-luminfire (351 commits)")[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (225 commits)")[![mvdnbrk](https://avatars.githubusercontent.com/u/802681?v=4)](https://github.com/mvdnbrk "mvdnbrk (46 commits)")[![pforret](https://avatars.githubusercontent.com/u/474312?v=4)](https://github.com/pforret "pforret (16 commits)")[![sebastiandedeyne](https://avatars.githubusercontent.com/u/1561079?v=4)](https://github.com/sebastiandedeyne "sebastiandedeyne (14 commits)")[![AlexVanderbist](https://avatars.githubusercontent.com/u/6287961?v=4)](https://github.com/AlexVanderbist "AlexVanderbist (7 commits)")[![riasvdv](https://avatars.githubusercontent.com/u/3626559?v=4)](https://github.com/riasvdv "riasvdv (5 commits)")[![irfanm96](https://avatars.githubusercontent.com/u/42065936?v=4)](https://github.com/irfanm96 "irfanm96 (5 commits)")[![yaroslawww](https://avatars.githubusercontent.com/u/23663794?v=4)](https://github.com/yaroslawww "yaroslawww (3 commits)")[![jessarcher](https://avatars.githubusercontent.com/u/4977161?v=4)](https://github.com/jessarcher "jessarcher (3 commits)")[![sixlive](https://avatars.githubusercontent.com/u/5108034?v=4)](https://github.com/sixlive "sixlive (3 commits)")[![willemvb](https://avatars.githubusercontent.com/u/1336390?v=4)](https://github.com/willemvb "willemvb (3 commits)")[![AdrianMrn](https://avatars.githubusercontent.com/u/12762044?v=4)](https://github.com/AdrianMrn "AdrianMrn (3 commits)")[![lloricode](https://avatars.githubusercontent.com/u/8251344?v=4)](https://github.com/lloricode "lloricode (2 commits)")[![brendt](https://avatars.githubusercontent.com/u/6905297?v=4)](https://github.com/brendt "brendt (2 commits)")[![narcisonunez](https://avatars.githubusercontent.com/u/6155516?v=4)](https://github.com/narcisonunez "narcisonunez (2 commits)")[![crynobone](https://avatars.githubusercontent.com/u/172966?v=4)](https://github.com/crynobone "crynobone (2 commits)")[![Nielsvanpach](https://avatars.githubusercontent.com/u/10651054?v=4)](https://github.com/Nielsvanpach "Nielsvanpach (2 commits)")[![gizburdt](https://avatars.githubusercontent.com/u/1470623?v=4)](https://github.com/gizburdt "gizburdt (2 commits)")[![jacobnollette-luminfire](https://avatars.githubusercontent.com/u/60987066?v=4)](https://github.com/jacobnollette-luminfire "jacobnollette-luminfire (2 commits)")

---

Tags

frameworklaravelbrilliant-portal

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/brilliant-portal-framework/health.svg)

```
[![Health](https://phpackages.com/badges/brilliant-portal-framework/health.svg)](https://phpackages.com/packages/brilliant-portal-framework)
```

###  Alternatives

[jonpurvis/squeaky

A Laravel Validation Rule to Help Catch Profanity.

706.0k](/packages/jonpurvis-squeaky)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)[blendbyte/filament-title-with-slug

TitleWithSlugInput - Easy Permalink Slugs for the FilamentPHP Form Builder (PHP / Laravel / Livewire)

1322.4k3](/packages/blendbyte-filament-title-with-slug)

PHPackages © 2026

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