Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Isuru Ahinsa's avatar

Multi Approval Level in Laravel

I have a application which is submitted by a user and needs to approval by different people with their feedbacks. Example: User submits application which requires approval of Admin, Reviewer and Dean in that order with status (Pending, Approved, Rejected) and feedbacks. How to implement this

0 likes
3 replies
Isuru Ahinsa's avatar

@tisuchi Thank you for your reply. I am already used spatie package for role and permissions but I want to define multiple approve levels to those roles. can you suggest database design for it?

Snapey's avatar
Snapey
Best Answer
Level 122

you could use a status table linked to application model

if status is 'admin-review' then it shows in a list of models that all have 'admin-review'. admin picks one and approves or rejects

suppose they approve, then record 'admin-approved' then record status of 'reviewer-review'

The same process is used at each level

since the status is added (not replacing previous status) you can easily get both the latest status and the complete history, and know at any time what step it is stuck at and how long each step takes

You could roll your own status table or use a package https://github.com/spatie/laravel-model-status

2 likes

Please or to participate in this conversation.