- Add the package to your project.
composer require webbundels/changelog
- Migrate the database.
php artisan migrate
- Add the method 'getChangelogViewableAttribute' to your user model.
- Write logic in this method that determines if the user can view the changelog page.
public function getChangelogViewableAttribute() :bool
{
return $this->can('view_changelog');
}
- Add the method 'getChangelogEditableAttribute' to your user model.
- Write logic in this method that determines if the user can edit the changelog page.
public function getChangelogEditableAttribute() :bool
{
return $this->can('edit_changelog');
}