mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 03:11:06 +03:30
feat: upgrade laravel version from 9 to 10
This commit is contained in:
@@ -30,6 +30,6 @@ class AuthServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
$this->registerPolicies();
|
$this->registerPolicies();
|
||||||
|
|
||||||
Passport::routes();
|
Passport::loadKeysFrom(__DIR__.'/../secrets/oauth');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-15
@@ -9,7 +9,7 @@ use Spatie\Permission\Traits\HasRoles;
|
|||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
use Notifiable , HasApiTokens , HasRoles;
|
use Notifiable, HasApiTokens, HasRoles;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
@@ -17,7 +17,7 @@ class User extends Authenticatable
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name' , 'email' , 'cell_number' , 'password' , 'status' , 'medical_center_id' , 'address' , 'gender'
|
'name', 'email', 'cell_number', 'password', 'status', 'medical_center_id', 'address', 'gender'
|
||||||
];
|
];
|
||||||
/**
|
/**
|
||||||
* The attributes that should be hidden for arrays.
|
* The attributes that should be hidden for arrays.
|
||||||
@@ -25,7 +25,7 @@ class User extends Authenticatable
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $hidden = [
|
protected $hidden = [
|
||||||
'password' , 'remember_token' ,
|
'password', 'remember_token',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -34,56 +34,56 @@ class User extends Authenticatable
|
|||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'email_verified_at' => 'datetime' ,
|
'email_verified_at' => 'datetime',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function medical_center()
|
public function medical_center()
|
||||||
{
|
{
|
||||||
return $this->belongsTo( 'App\MedicalCenter' );
|
return $this->belongsTo('App\MedicalCenter');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_results()
|
public function test_results()
|
||||||
{
|
{
|
||||||
return $this->hasMany( 'App\TestResult' );
|
return $this->hasMany('App\TestResult');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_types()
|
public function test_types()
|
||||||
{
|
{
|
||||||
return $this->hasMany( 'App\TestType' );
|
return $this->hasMany('App\TestType');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findForPassport( $username )
|
public function findForPassport($username)
|
||||||
{
|
{
|
||||||
return $this->where( 'cell_number' , $username )->where( 'status' , 'Active' )->first();
|
return $this->where('cell_number', $username)->where('status', 'Active')->first();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function messagesSent()
|
public function messagesSent()
|
||||||
{
|
{
|
||||||
return $this->hasMany( 'App\Message' , 'sender_user_id' );
|
return $this->hasMany('App\Message', 'sender_user_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function messagesReceived()
|
public function messagesReceived()
|
||||||
{
|
{
|
||||||
return $this->hasMany( 'App\Message' , 'recipient_user_id' );
|
return $this->hasMany('App\Message', 'recipient_user_id');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function packages()
|
public function packages()
|
||||||
{
|
{
|
||||||
return $this->hasMany( 'App\Package' );
|
return $this->hasMany('App\Package');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function items()
|
public function items()
|
||||||
{
|
{
|
||||||
return $this->hasMany( 'App\Item' );
|
return $this->hasMany('App\Item');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function labels()
|
public function labels()
|
||||||
{
|
{
|
||||||
return $this->hasMany( 'App\Label' );
|
return $this->hasMany('App\Label');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function cycles()
|
public function cycles()
|
||||||
{
|
{
|
||||||
return $this->hasMany( 'App\Cycle' );
|
return $this->hasMany('App\Cycle');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-9
@@ -9,17 +9,16 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.2",
|
||||||
"laravel/framework": "^9.0",
|
"laravel/framework": "^10.0",
|
||||||
"laravel/passport": "^10.0",
|
"laravel/passport": "^11.0",
|
||||||
"league/flysystem-aws-s3-v3": "^3.0",
|
"league/flysystem-aws-s3-v3": "^3.0",
|
||||||
"fideloper/proxy": "^4.0",
|
"spatie/laravel-medialibrary": "^10.0",
|
||||||
"spatie/laravel-medialibrary": "^9.0",
|
|
||||||
"kalnoy/nestedset": "^6.0",
|
"kalnoy/nestedset": "^6.0",
|
||||||
"laravel/tinker": "^2.0",
|
"laravel/tinker": "^2.0",
|
||||||
"lcobucci/jwt": "^4.0",
|
"lcobucci/jwt": "^4.0",
|
||||||
"maatwebsite/excel": "^3.1",
|
"maatwebsite/excel": "^3.1",
|
||||||
"milon/barcode": "^9.0",
|
"milon/barcode": "^10.0",
|
||||||
"sentry/sentry-laravel": "^2.3",
|
"sentry/sentry-laravel": "^3.0",
|
||||||
"spatie/laravel-permission": "^5.0"
|
"spatie/laravel-permission": "^5.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
@@ -27,8 +26,8 @@
|
|||||||
"filp/whoops": "^2.0",
|
"filp/whoops": "^2.0",
|
||||||
"fzaninotto/faker": "^1.4",
|
"fzaninotto/faker": "^1.4",
|
||||||
"mockery/mockery": "^1.0",
|
"mockery/mockery": "^1.0",
|
||||||
"nunomaduro/collision": "^6.1",
|
"nunomaduro/collision": "^7.0",
|
||||||
"phpunit/phpunit": "^9"
|
"phpunit/phpunit": "^10.0"
|
||||||
},
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
@@ -58,7 +57,7 @@
|
|||||||
"Tests\\": "tests/"
|
"Tests\\": "tests/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "stable",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"post-autoload-dump": [
|
"post-autoload-dump": [
|
||||||
|
|||||||
Generated
+499
-654
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user