You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I've setup a custom Media as per documentation.
Version:
"spatie/laravel-medialibrary": "^11.10"
config media-library.php:
...
/*
* The fully qualified class name of the media model.
*/
'media_model' => App\Models\Media::class,
...
custom Media.php:
<?php
namespace App\Models;
use Spatie\MediaLibrary\MediaCollections\Models\Media as BaseMedia;
class Media extends BaseMedia
{
public function test()
{
dump($this->collection_name, $this->disk);
return false;
}
},
...
my model Job.php:
<?php
namespace App\Models\Portal;
...
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\Image\Enums\Fit;
...
class Job extends Model implements HasMedia
{
use InteractsWithMedia;
...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've setup a custom Media as per documentation.
Version:
config media-library.php:
custom Media.php:
my model Job.php:
my code:
error:
other calls are working fine:
when I try this command:
I get:
Maybe I am missing something here. Your help is greatly appreciated.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions