Currently, the Laravel app is saving correctly on MyProject/public/storage but the image on the app is always broken. If I save the images on MyProject/storage/ directory it works, I think there is a config I need to update.
If I update APP_URL and use php artisan serve, there are no issues. But when I try to deploy it on xampp, the issue occurs.
please help
here is the directory details:
xampp/
├── htdocs/ (public folder)
│ ├── MyProject/
│ ├── storage/
│ ├── .htaccess
├── MyprojectCore/
│ ├── public/
| ├── storage/
│
filesystem.php
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
],
]
voyager.php
'storage' => [
'disk' => 'public',
],
.env
APP_URL=http://localhost:8080/MyProject
index.php
require __DIR__.'/../../ECRCore/vendor/autoload.php';
$app = require_once __DIR__.'/../../ECRCore/bootstrap/app.php';