From b28c20a015d4be7df15d3b30b8bdbbe61b63a94f Mon Sep 17 00:00:00 2001 From: Sergio Peris Date: Thu, 2 Jun 2022 17:54:18 +0200 Subject: [PATCH] wip --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eecd1d1..783f6d3 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ class Message extends Model implements MediaInteraction { use HasMedia; - public function getMediaTable() + public function getMediaTable(): string { return 'messages_media'; } @@ -105,12 +105,14 @@ php artisan media:create-table "App\Models\Message" Once you configured the model, you can attach media files to it. For example: +> If you don't specify a disk, the default disk will be used. + ```php addMediaFromDisk('/images/image.jpg', 'public'); +$message->addMediaFromDisk(path: '/images/image.jpg', disk: 'public'); ``` You can also attach a remote file: