A marketing CRUD system with Roles based permission to access routes. Users can see listed marketing channels but they cannot create, delete or update except an admin assigns them the "marketer" role

Set up:

Clone the project and install packages using composer install

create a .env and copy the .env.example to it while adjusting the database settings

Run php artisan migrate to create database

Populate database with users and one admin

There is a seeder for this run php artisan db:seed . it creates about 10 users and one user with the adminstrator role

Run php artisan serve

If run into passport issues, something like Call to a member function getKey() on null you can run this: php artisan passport:client --personal then copy the required passport credentials to your .env followed by php artisan optimize command

Test

For test, open another terminal and run php artisan test

Some Screeenshots and examples of crud.

login

Screenshot from 2024-03-18 14-20-36

Admin assinging marketer roles (admin can assign multiple users if they like )

Screenshot from 2024-03-18 14-19-58

non Admin trying to assing marketer role

Screenshot from 2024-03-18 14-25-20

listing all created market channels

Screenshot from 2024-03-18 14-29-50

creating market channels

Screenshot from 2024-03-18 14-29-59

viewing single market channel

Screenshot from 2024-03-18 14-36-43

updating a market channel

Screenshot from 2024-03-18 17-03-22

Deleting a market channel

image

After delete:

image