lundi 2 octobre 2017

S3 URL directly in Model

I am using S3 to save the images of my web-tool. At the moment I am saving the key ('images/x/y.jpg') to the database.

To get the URL of the file I am doing this:

Store::cloud()->url(key)

Is it possible, to do this step to convert the key to an url directly in a model? Is there a "preprocess"-function which I can overwrite in Laravel models?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire