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

cristian9509's avatar

Using constants in Eloquent Model?

I want to store the current stripe subscription status in my eloquent model so that I can do some comaprisons in my view and display specific information.

\\model
const CONST1 = 0;
const CONST2 = 1;

Or is the better way of using constants in the config folder and retrieve them using Config::get ()?

I will use them for storing user statuses, entity statuses, subscription statuses and a few more.

0 likes
0 replies

Please or to participate in this conversation.