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
Requires
- php: ^8.1
- apsonex/saas-utils: ^1.0
- intervention/image: ^2.7
Requires (Dev)
- fakerphp/faker: ^1.19
- nunomaduro/collision: ^6.1
- orchestra/testbench: ^7.1
- phpunit/phpunit: ^9.5
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)