Skip to content

Commit f2e687a

Browse files
author
cryptodev4
committed
Remove slug
1 parent a71bef5 commit f2e687a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/Models/Plan.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414
use Illuminate\Database\Eloquent\SoftDeletes;
1515
use Illuminate\Database\Eloquent\Relations\HasMany;
1616
use Illuminate\Database\Eloquent\Factories\HasFactory;
17+
// use Spatie\Sluggable\HasSlug;
1718

1819
/**
1920
* CryptoDev4\LaravelSubscriptions\Models\Plan.
2021
*
2122
* @property int $id
22-
* @property string $slug
2323
* @property array $name
2424
* @property array $description
2525
* @property bool $is_active
@@ -61,7 +61,6 @@
6161
* @method static \Illuminate\Database\Eloquent\Builder|\CryptoDev4\LaravelSubscriptions\Models\Plan whereProrateExtendDue($value)
6262
* @method static \Illuminate\Database\Eloquent\Builder|\CryptoDev4\LaravelSubscriptions\Models\Plan whereProratePeriod($value)
6363
* @method static \Illuminate\Database\Eloquent\Builder|\CryptoDev4\LaravelSubscriptions\Models\Plan whereSignupFee($value)
64-
* @method static \Illuminate\Database\Eloquent\Builder|\CryptoDev4\LaravelSubscriptions\Models\Plan whereSlug($value)
6564
* @method static \Illuminate\Database\Eloquent\Builder|\CryptoDev4\LaravelSubscriptions\Models\Plan whereSortOrder($value)
6665
* @method static \Illuminate\Database\Eloquent\Builder|\CryptoDev4\LaravelSubscriptions\Models\Plan whereTrialInterval($value)
6766
* @method static \Illuminate\Database\Eloquent\Builder|\CryptoDev4\LaravelSubscriptions\Models\Plan whereTrialPeriod($value)
@@ -70,6 +69,7 @@
7069
*/
7170
class Plan extends Model
7271
{
72+
// use HasSlug;
7373
use HasFactory;
7474
use SoftDeletes;
7575
// use SortableTrait;
@@ -80,7 +80,7 @@ class Plan extends Model
8080
* {@inheritdoc}
8181
*/
8282
protected $fillable = [
83-
'slug',
83+
// 'slug',
8484
'name',
8585
'description',
8686
'is_active',
@@ -104,7 +104,7 @@ class Plan extends Model
104104
* {@inheritdoc}
105105
*/
106106
protected $casts = [
107-
'slug' => 'string',
107+
// 'slug' => 'string',
108108
'is_active' => 'boolean',
109109
'price' => 'float',
110110
'signup_fee' => 'float',
@@ -174,7 +174,7 @@ public function __construct(array $attributes = [])
174174
{
175175
$this->setTable(config('cryptodev4.laravel-subscriptions.tables.plans'));
176176
$this->rules = [
177-
'slug' => 'required|alpha_dash|max:150|unique:'.config('cryptodev4.laravel-subscriptions.tables.plans').',slug',
177+
// 'slug' => 'required|alpha_dash|max:150|unique:'.config('cryptodev4.laravel-subscriptions.tables.plans').',slug',
178178
'name' => 'required|string|strip_tags|max:150',
179179
'description' => 'nullable|string|max:32768',
180180
'is_active' => 'sometimes|boolean',
@@ -280,10 +280,10 @@ public function hasGrace(): bool
280280
*
281281
* @return \CryptoDev4\LaravelSubscriptions\Models\PlanFeature|null
282282
*/
283-
public function getFeatureBySlug(string $featureSlug): ?PlanFeature
284-
{
285-
return $this->features()->where('slug', $featureSlug)->first();
286-
}
283+
// public function getFeatureBySlug(string $featureSlug): ?PlanFeature
284+
// {
285+
// return $this->features()->where('slug', $featureSlug)->first();
286+
// }
287287

288288
/**
289289
* Activate the plan.

0 commit comments

Comments
 (0)