I am trying to upload the image to ./../public_html directory in laravel 7. However, the image always goes to lsapp/app/public/ directory.
In my Controller,
$storagePath = $request->donation_poster->storeAs('public/donation-poster', 'donation-poster-'.time().'.jpg');
config/filesystems.php
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
'links' => [
public_path('donation-poster') => storage_path('app\public\donation-poster'),
]
I think maybe the php artisan storage:link command isn't call, but i have no idea how to call using cpanel as it doesn't provide a terminal.