- added subscriptionrequest

- Oasis model trait
This commit is contained in:
Peter Papp
2021-03-22 11:15:47 +01:00
parent 3c01ce5ad3
commit 45de6b557a
8 changed files with 116 additions and 10 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace App\Models\Oasis;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class SubscriptionRequest extends Model
{
use HasFactory;
protected $fillable = [
'requested_plan'
];
public $incrementing = false;
protected $keyType = 'string';
protected static function boot()
{
parent::boot();
static::creating(function ($order) {
$order->id = (string)Str::uuid();
});
}
}
+3
View File
@@ -5,6 +5,7 @@ namespace App\Models;
use App\Notifications\ResetPassword;
use App\Services\HelperService;
use App\Services\StripeService;
use App\Traits\Oasis;
use ByteUnits\Metric;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Factories\HasFactory;
@@ -20,6 +21,8 @@ class User extends Authenticatable
{
use Notifiable, Billable, Sortable, HasFactory, HasApiTokens;
use Oasis;
protected $guarded = [
'id',
'role'