Download the PHP package mach3builders/laravel-privatelabel without Composer
On this page you can find all versions of the php package mach3builders/laravel-privatelabel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mach3builders/laravel-privatelabel
More information about mach3builders/laravel-privatelabel
Files in mach3builders/laravel-privatelabel
Package laravel-privatelabel
Short Description Add private label functionality to mach3laravel applications
License MIT
Homepage https://github.com/mach3builders/laravel-privatelabel
Informations about the package laravel-privatelabel
Add private label functionality to mach3laravel applications
This package is designed for the laravel-starter
. It presupposes that your project was initiated using the laravel-starter
template.
Installation
Install the package via composer:
Publish and execute migrations:
Publish the configuration file:
Here's the published configuration file:
Add the following variables to your .env file:
Migrate the database
Usage
Navigation
Include the index route in your menu:
PHP
Incorporate this trait into your owner model as specified in the config:
JavaScript
Insert this snippet into your app.js
:
Brand Customization
To easily manage brand-specific elements like logos and favicons, use this Brand.php
template:
Label API
The label()
helper is provided by this package. Here are the methods and properties you can access:
Properties
Events
The email page gives the user the possibility to add a email to their private label. The domain of that email then gets added to the mailgun account of m3b. The user then has the ability to verify that this domain has been added and is verified.
After the domain has been verified the EmailDomainVerified
event gets dispatched. See the following example on how to listen to this event.
Authorization
Use the viewPrivateLabel
gate for secure access. Add this to your AuthServiceProvider.php
:
Methods
The following method returns the owner of the private label. This corresponds with the owner model set in the config
Since laravel-privatelabel uses spatie/medialibary all the methods are available.
The following collections are defined inside the PrivateLabel
model
Commands
The packages comes with 2 commands, one to update all php versions of the private labels and one to reinstall all private labels on the forge server.
Reinstall labels
the following command will reinstall all private labels on the forge server. The private label will be updated to status dns_validating
and will go trough the process of being installed on the server.
To reinstall all labels use:
To reinstall a specific label use:
Update label php versions
The following command will update all the php versions of the private labels. The php version will be updated to the latest version available on the forge server. Or to the version specified in the prompts asked to the user when running the command
Testing
Code styling
All code should be styled using the following command:
All versions of laravel-privatelabel with dependencies
illuminate/contracts Version ^10.0
laravel/forge-sdk Version ^3.13
spatie/laravel-medialibrary Version ^10.0
spatie/laravel-package-tools Version ^1.12