Skip to content

webbundels/documentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation

Installation

  1. Add the package to your project.
composer require webbundels/documentation
  1. Migrate the database.
php artisan migrate

View permissions

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

Edit permissions

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