-
-
Notifications
You must be signed in to change notification settings - Fork 93
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
When I define a new model for the plan in config/soulbscription.php, I cannot use some properties because these relationships are not defined in HasSubscriptions trait. For example, I can list the plans like this:
config('soulbscription.models.plan')::all();
But I can't change a plan that I have listed in this way.
$new_plan = config('soulbscription.models.plan')::find($plan_id);
$user->switchTo($new_plan);
Because dynamic relationship is not used in HasSubscriptions trait.
<?php
namespace LucasDotVin\Soulbscription\Models\Concerns;
use LucasDotVin\Soulbscription\Models\Plan;
.
.
.
trait HasSubscriptions
{
.
.
.
public function subscribeTo(Plan $plan, $expiration = null, $startDate = null): Subscription
{
.
.
.
}
}
I want to customise the plan table. I can add price, description, currency or different discriminator fields. I can associate this model with my invoices. I want to make many more customisations like this.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers