Skip to content

Commit

Permalink
Updated to Laravel 9
Browse files Browse the repository at this point in the history
  • Loading branch information
assada committed Jul 1, 2022
1 parent 8c7632c commit 1ff3ee5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
},
"require-dev": {
"phpunit/phpunit": "^8",
"laravel/laravel": "^6.0|^7.0|^8.0"
"laravel/laravel": "^6.0|^7.0|^8.0|^9.0"
}
}
2 changes: 1 addition & 1 deletion src/AchievementsServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function boot(): void
);
$this->publishes(
[
__DIR__ . '/Migrations/0000_00_00_000000_create_achievements_tables.php' => database_path('migrations') . '/000_00_00_000000_create_achievements_tables.php'
__DIR__ . '/Migrations/0000_00_00_000000_create_achievements_tables.php' => database_path('migrations/000_00_00_000000_create_achievements_tables.php')
],
'migrations'
);
Expand Down
2 changes: 1 addition & 1 deletion src/EntityRelationsAchievements.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ trait EntityRelationsAchievements
*/
public function achievements(): MorphMany
{
if (config('achievements.locked_sync')) {
if (config('achievements.locked_sync') && !empty($this->id)) {
$this->syncAchievements();
}
return $this->morphMany(AchievementProgress::class, 'achiever')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function up(): void
Schema::create(
$this->achievementDetailsTableName,
static function (Blueprint $table) {
$table->increments('id');
$table->id();
$table->string('name');
$table->string('description');
$table->unsignedInteger('points')->default(1);
Expand Down

0 comments on commit 1ff3ee5

Please sign in to comment.