- What Laravel versions does Ticketit support, and will it work with Laravel 9/10?
- Ticketit officially supports Laravel 5.1 through 5.7. While it may work with newer versions (9/10), you’ll need to manually test compatibility due to changes in facades, Blade syntax, or service providers. The package lacks explicit Laravel 8+ support, so verify migrations, auth system alignment, and asset paths (e.g., Vite conflicts) before upgrading.
- Can I use Ticketit in a headless Laravel API-only app, or is it frontend-only?
- Ticketit is primarily frontend-focused with Blade templates and relies on Laravel’s default auth. For API use, you’d need to manually create resource controllers or extend its routes. The package doesn’t include API documentation or resource endpoints out of the box, so assess whether custom development is feasible for your needs.
- How do I configure role-based permissions (e.g., restrict agents from closing tickets)?
- Ticketit uses Laravel’s built-in gates/policies for permissions. Edit the `app/Policies/TicketPolicy.php` file (or create one) to define rules like `before()` or `authorize()`. For example, restrict agents from closing tickets by checking their role in the policy method. The README lacks detailed policy examples, so refer to Laravel’s [policy documentation](https://laravel.com/docs/policies).
- Does Ticketit support ticket attachments (files, images) beyond the text editor’s image upload?
- The package includes a text editor with image uploads for ticket descriptions/comments, but **does not natively support general file attachments** (PDFs, docs, etc.). To add this, you’d need to extend the `Ticket` model or create a custom migration for an `attachments` table, then integrate a library like `spatie/laravel-medialibrary` or build upload logic manually.
- How does auto-agent assignment work, and can I customize the department/queue logic?
- Auto-assignment uses the agent’s `department` field and prioritizes agents with the fewest open tickets in that department. The logic is in `app/Providers/TicketitServiceProvider.php` (look for `assignAgentToTicket`). To customize, override this method or create a new service provider binding. Note: The package lacks SLA (Service Level Agreement) policies, so response-time tracking is manual.
- Will Ticketit conflict with my existing Laravel user fields (e.g., custom attributes like `phone`)?
- Ticketit relies on Laravel’s default `users` table and doesn’t add custom fields, so conflicts are unlikely. However, if you’ve extended the `users` table (e.g., `phone`, `department`), ensure these align with Ticketit’s agent assignment logic (which uses `department`). Always run `php artisan migrate` after installation to check for schema conflicts.
- How do I localize Ticketit for a non-supported language (e.g., Dutch) or override translations?
- Ticketit includes language packs via Laravel’s localization system. To add Dutch or override translations, publish the language files with `php artisan vendor:publish --tag=ticketit-lang`, then edit the generated `resources/lang/vendor/ticketit/` files. For dynamic language switching, use Laravel’s `App::setLocale()` or middleware.
- Can I integrate Ticketit with email notifications (e.g., send alerts when a ticket is assigned)?
- Yes, but you’ll need to extend the package. Hook into Laravel’s events (e.g., `ticket.created`, `ticket.assigned`) by listening in `EventServiceProvider`. Example: Add `TicketCreated::class` to `$listen` and dispatch a `TicketAssignedMail` notification. The package doesn’t include built-in email templates, so use Laravel’s `Mailable` classes.
- What are the performance implications of Ticketit for high-traffic sites (e.g., 10,000+ tickets/month)?
- Ticketit is lightweight but lacks optimizations like query caching or eager loading. For scale, manually add indexes to `tickets` and `ticket_user` tables (e.g., `ticket_id`, `user_id`). Monitor database queries with Laravel Debugbar and consider denormalizing data (e.g., agent stats) if dashboard performance degrades. Test with your expected load before production.
- Are there alternatives to Ticketit for Laravel, and how does it compare to Spatie’s Ticket system?
- Alternatives include **Spatie’s Laravel Ticket system** (more modular, API-friendly) and **Filament Support** (admin-panel integrated). Ticketit stands out for its simplicity and auto-assignment logic but lacks features like SLA policies, advanced search, or attachments. Spatie’s package is better for API-driven apps, while Ticketit is ideal for quick, frontend-focused implementations with minimal setup.