Update laravel framework from 9 to 11, removed some old packages
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Awobaz\Compoships\Compoships;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Arr;
|
||||
|
||||
@@ -17,7 +16,7 @@ use App\Traits\SiteID;
|
||||
*/
|
||||
class Charge extends Model
|
||||
{
|
||||
use Compoships,SiteID;
|
||||
use SiteID;
|
||||
|
||||
protected $casts = [
|
||||
'attributes' => 'json',
|
||||
|
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Awobaz\Compoships\Compoships;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Arr;
|
||||
@@ -21,7 +20,7 @@ use App\Traits\PushNew;
|
||||
*/
|
||||
class InvoiceItem extends Model
|
||||
{
|
||||
use Compoships,PushNew;
|
||||
use PushNew;
|
||||
|
||||
protected $dates = [
|
||||
'start_at',
|
||||
|
@@ -27,8 +27,8 @@ class Payment extends Model implements IDs
|
||||
{
|
||||
use PushNew,ScopeActive,ProviderRef;
|
||||
|
||||
protected $dates = [
|
||||
'paid_at',
|
||||
protected $casts = [
|
||||
'paid_at'=>'datetime:Y-m-d',
|
||||
];
|
||||
|
||||
// Array of items that can be updated with PushNew
|
||||
|
@@ -17,9 +17,9 @@ class UserPolicy
|
||||
* @param string $ability
|
||||
* @return bool|null
|
||||
*/
|
||||
public function before(User $uo,string $ability): ?bool
|
||||
public function before(User $uo,string $ability): bool
|
||||
{
|
||||
return $uo->isWholesaler() ?: NULL;
|
||||
return $uo->isWholesaler() ?: FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -2,7 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Awobaz\Compoships\Compoships;
|
||||
use Illuminate\Container\Container;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
@@ -66,7 +65,7 @@ use App\Traits\{ProductDetails,ProviderRef,SiteID};
|
||||
*/
|
||||
class Product extends Model implements IDs
|
||||
{
|
||||
use Compoships,HasFactory,SiteID,ProductDetails,ScopeActive,ProviderRef;
|
||||
use HasFactory,SiteID,ProductDetails,ScopeActive,ProviderRef;
|
||||
|
||||
protected $casts = [
|
||||
'pricing'=>'collection',
|
||||
|
@@ -20,9 +20,9 @@ class Broadband extends Type implements ServiceUsage
|
||||
{
|
||||
private const LOGKEY = 'MSB';
|
||||
|
||||
protected $dates = [
|
||||
'connect_at',
|
||||
'expire_at',
|
||||
protected $casts = [
|
||||
'connect_at'=>'datetime:Y-m-d',
|
||||
'expire_at'=>'datetime:Y-m-d',
|
||||
];
|
||||
protected $table = 'service_broadband';
|
||||
|
||||
|
@@ -72,11 +72,11 @@ class Site extends Model
|
||||
*/
|
||||
public function getAddressAttribute(): array
|
||||
{
|
||||
return [
|
||||
return array_filter([
|
||||
$this->site_address1,
|
||||
$this->site_address2,
|
||||
sprintf('%s %s %s',$this->site_city.(($this->site_state OR $this->site_postcode) ? ',' : ''),$this->site_state,$this->site_postcode)
|
||||
];
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,10 @@ use App\Models\Service\Broadband as ServiceBroadband;
|
||||
|
||||
class Broadband extends Model
|
||||
{
|
||||
protected $dates = ['date'];
|
||||
protected $casts = [
|
||||
'date'=>'datetime:Y-m-d',
|
||||
];
|
||||
|
||||
protected $table = 'usage_broadband';
|
||||
public $timestamps = FALSE;
|
||||
|
||||
|
@@ -17,7 +17,7 @@ use Leenooks\Traits\UserSwitch;
|
||||
use App\Interfaces\IDs;
|
||||
use App\Models\Scopes\SiteScope;
|
||||
use App\Notifications\ResetPassword as ResetPasswordNotification;
|
||||
use App\Traits\{QueryCacheableConfig,SiteID};
|
||||
use App\Traits\SiteID;
|
||||
|
||||
/**
|
||||
* Class User
|
||||
@@ -27,7 +27,7 @@ use App\Traits\{QueryCacheableConfig,SiteID};
|
||||
*/
|
||||
class User extends Authenticatable implements IDs
|
||||
{
|
||||
use HasFactory,HasApiTokens,Notifiable,UserSwitch,QueryCacheableConfig,SiteID,ScopeActive;
|
||||
use HasFactory,HasApiTokens,Notifiable,UserSwitch,SiteID,ScopeActive;
|
||||
|
||||
private const CACHE_TIME = 3600;
|
||||
|
||||
|
Reference in New Issue
Block a user