apsonex/laravel-document

There is no license information available for the latest version (v1.0.2) of this package.

v1.0.2 2022-10-15 13:34 UTC

This package is auto-updated.

Last update: 2024-10-15 18:15:11 UTC


README

Pending Document

Create pending document object

use Apsonex\LaravelDocument\Support\PendingDocument\PendingDocument;

(new PendingDocument)
    ->imageSource(UploadedFile|RetsObject|string)
    ->parentModel(Model)
    ->withoutOriginal()
    ->setVariations($variations = [])
    ->targetPath('full/image/path.jpg')
    ->setAddedBy(auth()->id())
    ->visibilityPublic()
    ->disk(\Illuminate\Filesystem\Filesystem)

Image Document

Create image document from pending document

use Apsonex\LaravelDocument\Support\PendingDocument\PendingDocument;
$pendingObject = new PendingDocument();

/** @var \Apsonex\LaravelDocument\Models\Document $document */
$document = \Apsonex\LaravelDocument\Facades\Document::persist($pendingObject)