I have 2 Laravel apps - One that allows users to upload images to their profile and one that is used just as an admin panel (using Nova). Both admin and user app use the same database but they are on different websites/domains. Also both apps are on the same VPS.
Is it possible to retrieve images in the UserResource in the admin app from the user app?
public function registerMediaCollections() : void {
$this->addMediaCollection('document')
->useDisk('media');
}
public function documents() {
return $this->hasMany(Media::class, 'model_id')
->where('collection_name', 'document');
}
I have 2 Laravel apps - One that allows users to upload images to their profile and one that is used just as an admin panel (using Nova). Both admin and user app use the same database but they are on different websites/domains. Also both apps are on the same VPS.
Is it possible to retrieve images in the UserResource in the admin app from the user app?
I've tried approach like this but no luck:
In UserResource
In User model
In filesystem config
Function parent_public_path
PARENT_APP_URL
equalshttps://userapp.myapp.com