Example of File upload in guillaumebriday/laravel-blog

File composer.json (link to Github)
{
    //
    "require": {
        "php": "^7.4",
        //
        "spatie/laravel-medialibrary": "8.10.1"
    },
    //
}
File app/Models/MediaLibrary.php (link to Github)
use Illuminate\Database\Eloquent\Model;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\MediaLibrary\MediaCollections\Models\Media;

class MediaLibrary extends Model implements HasMedia
{
    use InteractsWithMedia;

    public function registerMediaConversions(Media $media = null): void
    {
        $this->addMediaConversion('thumb')
              ->width(350)
              ->height(250);
    }
}
File resources/views/admin/media/create.blade.php (link to Github)
@extends('admin.layouts.app')

@section('content')
    <h1>@lang('media.create')</h1>

    {!! Form::open(['route' => ['admin.media.store'], 'method' =>'POST', 'files' => true]) !!}
        <div class="form-group">
            {!! Form::label('image', __('media.attributes.image')) !!}
            {!! Form::file('image', ['accept' => 'image/*', 'class' => 'form-control' . ($errors->has('image') ? ' is-invalid' : ''), 'required']) !!}

            @error('image')
                <span class="invalid-feedback">{{ $message }}</span>
            @enderror
        </div>
//
@endsection
File app/Http/Controllers/Admin/MediaLibraryController.php (link to Github)
use App\Http\Controllers\Controller;
use App\Http\Requests\Admin\MediaLibraryRequest;
use App\Models\MediaLibrary;

class MediaLibraryController extends Controller
{
    //
    public function store(MediaLibraryRequest $request): RedirectResponse
    {
        $image = $request->file('image');
        $name = $image->getClientOriginalName();

        if ($request->filled('name')) {
            $name = $request->input('name');
        }

        MediaLibrary::first()
            ->addMedia($image)
            ->usingName($name)
            ->toMediaCollection();

        return redirect()->route('admin.media.index')->withSuccess(__('media.created'));
    }
    //
}

Additional resources on File upload: