We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
sertxudev
Learn more about funding links in repositories.
Report abuse
1 parent a213ead commit b28c20aCopy full SHA for b28c20a
README.md
@@ -76,7 +76,7 @@ class Message extends Model implements MediaInteraction
76
{
77
use HasMedia;
78
79
- public function getMediaTable()
+ public function getMediaTable(): string
80
81
return 'messages_media';
82
}
@@ -105,12 +105,14 @@ php artisan media:create-table "App\Models\Message"
105
106
Once you configured the model, you can attach media files to it. For example:
107
108
+> If you don't specify a disk, the default disk will be used.
109
+
110
```php
111
<?php
112
113
$message = Message::find(1);
114
-$message->addMediaFromDisk('/images/image.jpg', 'public');
115
+$message->addMediaFromDisk(path: '/images/image.jpg', disk: 'public');
116
```
117
118
You can also attach a remote file:
0 commit comments