webbundels/essentials

Webbundels Essentials

1.0.0 2025-02-27 12:43 UTC

This package is not auto-updated.

Last update: 2025-06-11 06:50:14 UTC


README

Installation

  1. Add the package to your project.
composer require webbundels/essentials
  1. Add the needed arguments to your .env file
# The token that the package will use to send requests to github to gather info.
GITHUB_TOKEN='github_YOURTOKEN'
# The owner of the repositories, for example: github.com/{owner}/{repo}
GITHUB_OWNER='webbundels'
# The repository(ies) of which the package should gather commits from seperate each repository with a ','
GITHUB_REPOSITORIES='jongfresh-app,jongfresh-online'
  1. Migrate the database.
php artisan migrate

View permissions

  1. Add the methods 'getChangelogViewableAttribute' and 'getDocumentationViewableAttribute' to your user model.
  2. Write logic in this method that determines if the user can view the changelog/documentation page.
public function getChangelogViewableAttribute() :bool
{
    return $this->can('view_changelog');
}

public function getDocumentationViewableAttribute() :bool
{
    return $this->can('view_documentation');
}

Edit permissions

  1. Add the method 'getChangelogEditableAttribute' and 'getDocumentationEditableAttribute' to your user model.
  2. Write logic in this method that determines if the user can edit the changelog/documentation page.
public function getChangelogEditableAttribute() :bool
{
    return $this->can('edit_changelog');
}

public function getDocumentationEditableAttribute() :bool
{
    return $this->can('edit_changelog');
}