Download the PHP package brilliant-portal/framework without Composer

On this page you can find all versions of the php package brilliant-portal/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package framework

[TOC]

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 for more information.

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

PHP Support Matrix

PHP Version Version
> 8.0 1.x.x
7.4 0.1.x

Installation

Install the package via composer with a custom repository.

  1. Install the app:

You can publish the config file with:

This is the contents of the published config file:

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

Branding

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

Views

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

BetterUptime

See https://betteruptime-laravel.brilliantpackages.com for documentation.

Usage

Permissions

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

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.

Screenshot of creating a new team:

Screenshot of message for joining an existing team:

Users

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:

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.

Passwords

BrilliantPortal Framework sets some default password complexity requirements. See the Laravel documentation for more information.

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

Several handy components are provided out of the box:

Example screenshot:

To customize these, see publishing views.

Search Engine Optimization

This package uses the Spatie Laravel Robots Middleware package 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:

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.

API

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)):

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 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

You should create 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 https://vyuldashev.github.io/laravel-openapi 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

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.


All versions of framework with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/contracts Version ^11.0
laravel/framework Version ^11.0
laravel/jetstream Version ^5.1
laravel/telescope Version ^5.1
spatie/laravel-package-tools Version ^1.16
spatie/laravel-robots-middleware Version ^1.4
tartanlegrand/laravel-openapi Version ^1.13
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package brilliant-portal/framework contains the following files

Loading the files please wait ....