feat: upgrade laravel version from 9 to 10

This commit is contained in:
amir-ys
2024-11-07 00:18:46 +03:30
parent b779e9a186
commit b7efa6b24a
4 changed files with 523 additions and 679 deletions
+1 -1
View File
@@ -30,6 +30,6 @@ class AuthServiceProvider extends ServiceProvider
{
$this->registerPolicies();
Passport::routes();
Passport::loadKeysFrom(__DIR__.'/../secrets/oauth');
}
}
+15 -15
View File
@@ -9,7 +9,7 @@ use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable
{
use Notifiable , HasApiTokens , HasRoles;
use Notifiable, HasApiTokens, HasRoles;
/**
* The attributes that are mass assignable.
@@ -17,7 +17,7 @@ class User extends Authenticatable
* @var array
*/
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.
@@ -25,7 +25,7 @@ class User extends Authenticatable
* @var array
*/
protected $hidden = [
'password' , 'remember_token' ,
'password', 'remember_token',
];
/**
@@ -34,56 +34,56 @@ class User extends Authenticatable
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime' ,
'email_verified_at' => 'datetime',
];
public function medical_center()
{
return $this->belongsTo( 'App\MedicalCenter' );
return $this->belongsTo('App\MedicalCenter');
}
public function test_results()
{
return $this->hasMany( 'App\TestResult' );
return $this->hasMany('App\TestResult');
}
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()
{
return $this->hasMany( 'App\Message' , 'sender_user_id' );
return $this->hasMany('App\Message', 'sender_user_id');
}
public function messagesReceived()
{
return $this->hasMany( 'App\Message' , 'recipient_user_id' );
return $this->hasMany('App\Message', 'recipient_user_id');
}
public function packages()
{
return $this->hasMany( 'App\Package' );
return $this->hasMany('App\Package');
}
public function items()
{
return $this->hasMany( 'App\Item' );
return $this->hasMany('App\Item');
}
public function labels()
{
return $this->hasMany( 'App\Label' );
return $this->hasMany('App\Label');
}
public function cycles()
{
return $this->hasMany( 'App\Cycle' );
return $this->hasMany('App\Cycle');
}
}
+8 -9
View File
@@ -9,17 +9,16 @@
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^9.0",
"laravel/passport": "^10.0",
"laravel/framework": "^10.0",
"laravel/passport": "^11.0",
"league/flysystem-aws-s3-v3": "^3.0",
"fideloper/proxy": "^4.0",
"spatie/laravel-medialibrary": "^9.0",
"spatie/laravel-medialibrary": "^10.0",
"kalnoy/nestedset": "^6.0",
"laravel/tinker": "^2.0",
"lcobucci/jwt": "^4.0",
"maatwebsite/excel": "^3.1",
"milon/barcode": "^9.0",
"sentry/sentry-laravel": "^2.3",
"milon/barcode": "^10.0",
"sentry/sentry-laravel": "^3.0",
"spatie/laravel-permission": "^5.0"
},
"require-dev": {
@@ -27,8 +26,8 @@
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9"
"nunomaduro/collision": "^7.0",
"phpunit/phpunit": "^10.0"
},
"config": {
"optimize-autoloader": true,
@@ -58,7 +57,7 @@
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
Generated
+499 -654
View File
File diff suppressed because it is too large Load Diff