Files Not Store In Laravel

  laravel

I’M using Laravel For Api I Store Image in Public Folder.it store file in localhost but not store file in C-Panel.
this is my controller code

$file->name = $req->input('name');
            $file->file_size = $req->input('size');
            $file->file_url = $req->file('file_url')->store('files');
            $file->file_type = $req->input('type');
            $file->folder_id = $req->input('folder_id');
            $file->user_id = $req->input('user_id');
            $file->status = $req->input('status');
            $file->save();
            return  $file;

this code i add in fileSystem.php for save file in custom folder

    'links' => [
        public_path('files') => storage_path('app/files'),
    ],

Source: Laravel

Leave a Reply