Skip to content

RaniaFarrag/Advertising

Repository files navigation

Advertising

To Run The project
1 - clone the project from git
2 - copy .env.example file and rename the new copy .env only
3 - add your DB details in .env file
4 - Run composer install command
5 - Run php artisan key:generate command
6 - Run php artisan migrate:fresh --seed command
7 - Run php artisan serve command

/*******************************************************/

Assumtions

1 - This Module is a group of Apis for advertiser app
2 - There are two types of roles (Admin, Advertiser). So I used Saptie laravel permissions package to handle this and for scalability in the future
3 - I used JWT Package and perform register, login and logout methods
4 - The Admin have all permissions, Advertiser can show All Ads, Filter them and show his Ads.
5 - Each Ad has many related tags and each tag has many ads So the relation will be ManyToMany
6 - I added created_by_user_id attribute in ads table to know who did add the ad for scalability if we have different users not admin (ex: sales, HR, ...) can add the ads in the future

/********************************************************/

Admin Permissions

1 - login
2 - logout
3 - MAnage Tags
4 - Manage Categories
5 - View All Ads
6 - Filter Ads
7 - Add ads
8 - show Advertiser's Ads

Advertiser Permissions

1 - Register
2 - login
3 - logout
4 - View All Ads
5 - Filter Ads
6 - show His Ads

/********************************************************/

Unit Tests

  • Added Unit Tests for Test The Response of Routes

/********************************************************/

To Run Collection On Postman

Add to Variables in collection 1 - url 2 - token

/********************************************************/

Note : I used my personal email on Mailtrap to receieve daily email

if you want to see and test it please contact me

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors