Download the PHP package sgcomptech/filament-ticketing without Composer
On this page you can find all versions of the php package sgcomptech/filament-ticketing. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sgcomptech/filament-ticketing
More information about sgcomptech/filament-ticketing
Files in sgcomptech/filament-ticketing
Package filament-ticketing
Short Description A Laravel Filament plugin to support issue tracking and ticketing system.
License MIT
Homepage https://github.com/sgcomptech/filament-ticketing
Informations about the package filament-ticketing
Filament Ticketing
A Laravel Filament Admin Panel plugin package to add support for issue tracking and ticketing system into your Filament project.
Requirements
Software | Versions |
---|---|
PHP | 8.0, 8.1 |
Laravel | 8.x, 9.x, 10.x |
Filament | 2.x |
Installation
You can install the package via composer:
Run the migrations with:
You can publish the config file with:
This is the content of the published config file:
You can publish the translation files with:
Usage
Interact your models with tickets
Tickets could be on general matters or could be related to some instances in your project.
For example, your users may raise a ticket that is related to one of their past orders.
In such case, you may want to interact that order with the tickets raised.
You can achieve this by implementing HasTickets
and use InteractsWithTickets
trait in your eloquent model class.
By default, this package uses the model attribute name
for display.
You can change this by implementing public function model_name(): string
to return the required attribute for display.
Once your model is prepared, you can add a table action button at the model resource to navigate to the linked ticket list page. At this list page, the associated tickets for that model instance will be displayed and any new tickets created will also be linked to that model instance.
It is possible to implement HasTickets
on multiple models in your project.
Filament Admin Panel Menu
As with most other Filament resources, you can control and secure the access of Ticket operations in Admin Panel's menu with a policy file. For example, you can create a new policy file and register it in your AuthServiceProvider.
For more details, see Laravel model policies.
Authorization
This package has an option to use Laravel policies to authorise various actions that can be performed on the tickets.
Besides the usual Filament resource policies, the additional permissions to implement are:
manageAllTickets
- grant permission to user who can add comments and change status of any tickets.manageAssignedTickets
- grant permission to user who can only add comments and change status to tickets that are explicitly assigned to them.assignTickets
- grant permission to user who can assign tickets to any users who have the permissionmanageAssignedTickets
.
For example, you may use other authorization packages, like Filament User Authentication, to implement TicketPolicies
in your policy file like so:
Events
This package will dispatch the following events as listed in the table below. Note that the namespace of these events is Sgcomptech\FilamentTicketing\Events
.
Event | Event Object | Description |
---|---|---|
NewTicket |
Ticket |
When a new ticket is created. |
NewComment |
Comment |
When a new comment is created. |
NewResponse |
Comment |
When a new response is created. |
NewAssignment |
Ticket |
When a ticket is being assigned to a user. |
You can use these events to send notifications to relevant users in your application. Refer to Laravel document on how to register Events and Listeners.
Testing
Todo
- [x] Translation
- [x] List tickets filters
- [ ] Badges
- [ ] Widget
- [ ] Attach media or files to ticket
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
If you want to contribute to Filament Ticketing packages, you may fork this repository, create a new branch, make you changes and submit a PR. Be sure to run the test scripts to make sure that nothing else is broken. More details can be found at github quickstart.
Security Vulnerabilities
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Lee Kai Mun
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of filament-ticketing with dependencies
filament/filament Version ^2.16
illuminate/contracts Version ^9.0|^10.0
laravel/framework Version ^9.0|^10.0
spatie/laravel-package-tools Version ^1.14