1 year ago

Upload Image not saved at directory on server Laravel 5.8

Posted 1 year ago by adhik13th

I deploy my website , and i have a bug on my upload image , this image cant saved at directory

my directory is in

in public_html on folder named files

on localhost its not having problem but after i deploy this , i have it .

my Controller on my localhost (not have problem like this)

 public function store6(Request $request)
    $this->validate($request, [



        {   $file = $request->file('image');
            $file->move(public_path().'/files/', $name);  
            $data = $name;  

    $user = new pemeliharaan;
    $id = Auth::user()->id;

    $user->user_id = $id;
    $user->alat_id = $request->alat_id;
    $user->pertanyaan =json_encode($request->except
    $user->catatan = $request->catatan;
    $user->status = $request->status;

  // dd($user);
    return redirect('user/show6')->with('success', 'Data Telah Terinput');


this image "name" saved on DB but this file not saved , cant someone correct my code ?

Please sign in or create an account to participate in this conversation.