Example of File upload in LaravelDaily/Laravel-Support-Ticketing

File composer.json (link to Github)
{
    //
    "require": {
        "php": "^7.3",
        //
        "spatie/laravel-medialibrary": "^8.7"
    },
    //
}
File app/Ticket.php (link to Github)
use App\Traits\Auditable;
use Illuminate\Database\Eloquent\Model;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;

class Ticket extends Model implements HasMedia
{
    use SoftDeletes, InteractsWithMedia, Auditable;

    //
    public function registerMediaConversions(Media $media = null): void
    {
        $this->addMediaConversion('thumb')->width(50)->height(50);
    }
    //
}
File app/Http/Controllers/Admin/TicketsController.php (link to Github)
use App\Http\Controllers\Controller;
use App\Http\Requests\StoreTicketRequest;
use App\Ticket;

class TicketsController extends Controller
{
    //
    public function store(StoreTicketRequest $request)
    {
        $ticket = Ticket::create($request->all());

        foreach ($request->input('attachments', []) as $file) {
            $ticket->addMedia(storage_path('tmp/uploads/' . $file))->toMediaCollection('attachments');
        }

        return redirect()->route('admin.tickets.index');
    }
    //
}

Additional resources on File upload: