Within my example-component
, I have integrated a third-party media upload child component called media-uploader
:
<example-component>
<form :action= "something">
// Other input types
<media-upload
:ref="'cover_uploader'"
:collection="'cover'"
:url="'{{ route('admin.upload.media', $folder) }}'"
:accepted-file-types="''"
:max-number-of-files="5"
:max-file-size-in-mb="100"
:accepted-file-types="''">
</media-upload>
</form>
</example-component>
The :url
within the media-uploader
component leads to a controller logic:
public function something()
{
$variable = "Something";
return response()->json($variable);
}
I have full access to the example-component
, but not the media-uploader
. How can I retrieve the value of $variable
from the controller in order to use it within my example-component
?