You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I feel like I'm missing something obvious here but I can't seem to query the current model variables inside of registerMediaCollections - not sure if the model isn't booted yet or something like that.
Here's my code -
` public function registerMediaCollections(): void
{
$filesAllowed = $this->plan->code != 'free' ? 5 : 1;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I feel like I'm missing something obvious here but I can't seem to query the current model variables inside of registerMediaCollections - not sure if the model isn't booted yet or something like that.
Here's my code -
` public function registerMediaCollections(): void
{
$filesAllowed = $this->plan->code != 'free' ? 5 : 1;
Basically wanting to query if the user is on x plan then allow 5 images in the collection, else just allow one.
Thanks for any help - and apologies in advance I know it's something obvious but can't put my finger on it! 😂
Beta Was this translation helpful? Give feedback.
All reactions