added cashier subscription, subscription plans

This commit is contained in:
Gitea
2025-05-03 06:13:19 +05:30
parent e04539f1b7
commit 6e2a750c4e
23 changed files with 1087 additions and 21 deletions

23
app/Models/Plan.php Normal file
View File

@@ -0,0 +1,23 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Plan extends Model
{
protected $fillable = [
'name',
'description',
'product_id',
'pricing_id',
'price',
'monthly_billing',
'details'
];
protected $casts = [
'details' => 'json',
'monthly_billing' => 'boolean',
];
}

View File

@@ -10,11 +10,12 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Support\Str;
use Laravel\Cashier\Billable;
class User extends Authenticatable implements FilamentUser, MustVerifyEmail
{
/** @use HasFactory<\Database\Factories\UserFactory> */
use HasFactory, Notifiable;
use HasFactory, Notifiable, Billable;
/**
* The attributes that are mass assignable.