Skip to content

Commit b28c20a

Browse files
committedJun 2, 2022
wip
1 parent a213ead commit b28c20a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed
 

‎README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class Message extends Model implements MediaInteraction
7676
{
7777
use HasMedia;
7878

79-
public function getMediaTable()
79+
public function getMediaTable(): string
8080
{
8181
return 'messages_media';
8282
}
@@ -105,12 +105,14 @@ php artisan media:create-table "App\Models\Message"
105105

106106
Once you configured the model, you can attach media files to it. For example:
107107

108+
> If you don't specify a disk, the default disk will be used.
109+
108110
```php
109111
<?php
110112

111113
$message = Message::find(1);
112114

113-
$message->addMediaFromDisk('/images/image.jpg', 'public');
115+
$message->addMediaFromDisk(path: '/images/image.jpg', disk: 'public');
114116
```
115117

116118
You can also attach a remote file:

0 commit comments

Comments
 (0)
Please sign in to comment.