I want to access a class constant in a Blade file without using the full path:
class PaymentMethod extends Model
{
const PAYPAL_ACCOUNT = 'paypal_account';
const CREDIT_CARD = 'credit_card';
}
In my blade file this works:
{{ App\Classes\Models\PaymentMethod::CREDIT_CARD }}
...but this throws Class 'PaymentMethod' not found
{{ PaymentMethod::CREDIT_CARD }}
Is there a less verbose way to access this constant?