Initial commit: Animexe Laravel platform

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 00:01:48 +03:00
co-authored by Claude Opus 4.8
commit a63515cfc6
366 changed files with 74773 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class MembershipPlan extends Model
{
protected $fillable = [
'name', 'slug', 'description', 'price', 'purchase_link', 'duration_days', 'trial_days',
'features', 'perks', 'is_active', 'is_public', 'visible_until', 'sort_order',
'badge_label', 'accent_color',
];
protected $casts = [
'features' => 'array',
'perks' => 'array',
'is_active' => 'boolean',
'is_public' => 'boolean',
'visible_until' => 'datetime',
'price' => 'float',
'trial_days' => 'integer',
];
/** Belirli bir perk'in bu planda aktif olup olmadığını döner */
public function hasPerk(string $key): bool
{
return !empty(($this->perks ?? [])[$key]);
}
public function subscriptions()
{
return $this->hasMany(Subscription::class, 'plan_id');
}
}