Handling File Uploads
This package doesn't come with file upload feature (yet) Instead you can use laravel-medialibrary by Spatie, to handle file functionality.
The steps are pretty straight forward, all what you need to do is the following.
Extends the Ticket
model, by creating a new model file in your application by
1php artisan make:model Ticket
Then extend the base Ticket Model
, then use InteractWithMedia
trait by spatie package, and the interface HasMedia
:
1namespace App\Models\Ticket;2use Spatie\MediaLibrary\HasMedia;3use Spatie\MediaLibrary\InteractsWithMedia;4 5class Ticket extends \Coderflex\LaravelTicket\Models\Ticket implements HasMedia6{7 use InteractsWithMedia;8}
The rest of the implementation, head to the docs of spatie package to know more.