How To Upload file from https://subdomain.laravel.com/
to https://assets.laravel.com/
Example your project on https://subdomain.laravel.com/
'assets' => [
'driver' => 'local',
'root' => public_path('assets/images'), // Path ke folder 'images' dalam folder 'assets'
'url' => 'https://assets.laravel.com/', // URL publik untuk mengakses file
'visibility' => 'public',
2
Answers
Generally, if you want to serve uploaded assets from another domain, you can use cloud storage.
Check out the AWS S3+CloudFront architecture.
The official Laravel Vapor also uses this architecture.
The idea of "uploading to another domain" is wrong.
if you want to save your file to another subdomain its possible with two ways:
1: if your subdomain are in same server then you can locate with file directory path
2: If both server or different then you can make service for that to uploaf file by FTP or SFTP method its best way
Configure the FTP Disk in config/filesystems.php
Set Up Environment Variables
strong textUpload File via FTP
Handling Errors
This code help to uploads a file from your Laravel application to a remote server using FTP.