mercredi 7 février 2018

How to get path or name of image that store in Storage?

I'm trying to store images in storage also that image name in database.

$file = $request -> file('attachments');
Storage::disk('public')->put('images',$file);

$attachments = new Attachment();
$attachments -> title = $title;
$attachments -> path = "NAME OF IMAGE THAT ALREADY STORED ($FILE)";

$inbox_attachments->save();

Example of image name is

5MgomzwHmMxUhKqRu7T4SMhjvfrWtdKLArBSc3bI.jpg



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire