How to set up Laratrust | Laravel 8 User Management | Article #1

This article is the first in a series covering the management of roles and permissions in Laravel using the Laratrust package. As part of this series we will build a simple blog using the CKEditor, we will learn how to apply Laratrust in managing users on the website and how to use Laratrust’s team feature. This article, however will cover setting up your database, Laratrust and the CKEditor. Follow the steps below and you will be ready to go:

1. Create a new Laravel project

composer create-project laravel/laravel blog

Run the following line to navigate into the folder:

cd blog

Don’t forget to update your .env file with the appropriate database name.

2. Setup your basic authentication system with Laravel Breeze

To setup Laravel Breeze, run the following lines in the order they appear on your command line:

composer require laravel/breeze --devphp artisan breeze:installnpm installnpm run devphp artisan migrate

Running the following lines in your browser will create an authentication system for one type of user.

3. Install Laratrust on your website

composer require santigarcor/laratrustphp artisan vendor:publish --tag="laratrust"php artisan config:clearphp artisan laratrust:setupcomposer dump-autoloadphp artisan migrate:fresh

4. Acquire CKEditor 5 CDN

<script src=""></script>

5. We’re good to go!!!

Related Articles

How to set up Laratrust | Laravel 8 User Management | Article #2

Laravel 8: MySQL Database Query Tip Sheet #4