Scope orderby subscription level - Cashier
I have 3 subscription levels with Laravel Cashier and Stripe.
Free - no customer/subscription created. Pro Member - monthly subscription Pro Plus member - monthly subscription
I have been tasked with ordering Users by subscription like so.
Pro Plus Member - Priority 1 Pro Member - Priority 2 Free - Priority 3
The only idea I have is to have an integer 'order' field on the user model and create a global scope to order by this field.
But I am wondering if there is a tidier way that I can do the calculation based on the stripe_plan itself?
Stripe Plans Ids are as above:
Pro Plus Member Pro Member Free (no stripe plan created)
Thanks in advance
Ralph
Please or to participate in this conversation.