added upload

This commit is contained in:
franknstayn
2021-07-15 21:56:22 +08:00
parent bdec26daca
commit 8ddfee5d85
2 changed files with 8 additions and 13 deletions

View File

@@ -1,13 +1,14 @@
APP_ENV=local APP_ENV=local
APP_DEBUG=true APP_DEBUG=true
APP_KEY=base64:OUdSIwBBm7TFkAH3osLaZCa0XH7xCSzvmjziDaIN9bk= APP_KEY=SomeRandomString
APP_URL=http://localhost APP_URL=http://localhost
DB_CONNECTION=mysql DB_CONNECTION=mysql
DB_HOST=localhost DB_HOST=127.0.0.1
DB_DATABASE=merchbay_laravel DB_PORT=3306
DB_USERNAME=root DB_DATABASE=homestead
DB_PASSWORD= DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=file CACHE_DRIVER=file
SESSION_DRIVER=file SESSION_DRIVER=file
@@ -23,9 +24,3 @@ MAIL_PORT=2525
MAIL_USERNAME=null MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=null MAIL_ENCRYPTION=null
IMAGES_DIRECTORY=https://crewsportswear.com/uploads/images/
PRODUCTION_PRIVATE_SERVER=http://crewsportswear.app
UPLOAD_FOLDER_PATH=/var/www/html/uploads/images/

View File

@@ -196,8 +196,8 @@ class AdminController extends Controller
if ($res) { if ($res) {
Storage::putFileAs('uploads')->put('/teamstore/' . $store_url . '/' . $store_logo_name, fopen($request->file('store_logo'), 'r+')); Storage::disk('uploads')->put('/teamstore/' . $store_url . '/' . $store_logo_name, fopen($request->file('store_logo'), 'r+'));
Storage::putFileAs('uploads')->put('/teamstore/' . $store_url . '/' . $store_banner_name, fopen($request->file('store_banner'), 'r+')); Storage::disk('uploads')->put('/teamstore/' . $store_url . '/' . $store_banner_name, fopen($request->file('store_banner'), 'r+'));
return response()->json(array( return response()->json(array(
'success' => true, 'success' => true,