User Interface
Reference
- Activity
- Addresses
- Calls
- Chat
- Custom Field Groups
- Custom Fields
- Customers
- Deals
- Deliveries
- Email Marketing
- Files
- Invoices
- Labels
- Lead Sources
- Leads
- Lunches
- Meetings
- Notes
- Orders
- Organisations
- People
- Permissions
- Pipelines
- Product Attributes
- Product Categories
- Products
- Purchase Orders
- Quotes
- Roles
- SMS Marketing
- Tasks
- Tax Rates
- Teams
- Users
Permissions
Overview
Permissions extend Spatie Permission to provide granular access control within the CRM. CRM-specific permissions are distinguished via the crm_permission flag and are assigned to Roles.
Model: VentureDrake\LaravelCrm\Models\Permission
Extends: Spatie\Permission\Models\Permission
Scopes
crm
Filters to only CRM permissions.
$permissions = Permission::crm()->get();
Usage
use VentureDrake\LaravelCrm\Models\Permission;
// Get all CRM permissions
$permissions = Permission::crm()->get();
// Check a permission
$user->can('view leads');
// Grant permission via role
$role->givePermissionTo('edit deals');
Permission Naming Convention
CRM permissions follow the pattern {action} {entity}:
view leads,create leads,edit leads,delete leadsview deals,create deals,edit deals,delete deals- And so on for each entity type
Seeding Permissions
php artisan laravelcrm:permissions