mercredi 4 juillet 2018

Cant Store Images to public storage (LARAVEL)

Good day.

I have problem why I cant store the image to the public storage. when i was in localhost the function is working. however when i put in the host it shows the image cant move to the public storage. what is the problem to that? Thanks I hope you will help me to solved this..

This my controller:

$content_image = $request->input('content_assets');
$file_upload = $request->file('content_assets');

if($request->hasFile('content_assets'))
{
    $request->validate([
    'content_assets' => 'required|mimes:jpg,jpeg,png',      
     ]);

    $x = $request->content_assets->storeAs('/public',$content_image);
    dd($x);
}

The Output:

"public/36527000_2029863913704669_3320467206839468032_n.jpg"

This is the Path:

C:\xampp\htdocs\Hiflyer\public



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire