Skip to content

Commit

Permalink
Merge pull request #23 from alex1897/rout-key-name-slug
Browse files Browse the repository at this point in the history
Rout key name slug
  • Loading branch information
harishdurga authored Aug 3, 2022
2 parents 4f653d1 + a00ec0f commit 0343916
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Models/Quiz.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,9 @@ public function quizAuthors()
{
return $this->hasMany(config('laravel-quiz.models.quiz_author'));
}

public function getRouteKeyName()
{
return 'slug';
}
}
5 changes: 5 additions & 0 deletions src/Models/Topic.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,9 @@ protected static function newFactory()
{
return TopicFactory::new();
}

public function getRouteKeyName()
{
return 'slug';
}
}

0 comments on commit 0343916

Please sign in to comment.