Updated file upload directory for InvoiceInTransit resource to 'uploads/InvoiceInTransit'
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Gemini PR Review / Gemini PR Review (pull_request) Has been cancelled
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Has been cancelled
Laravel Larastan / larastan (pull_request) Has been cancelled
Laravel Pint / pint (pull_request) Has been cancelled
This commit is contained in:
@@ -255,7 +255,7 @@ class InvoiceInTransitResource extends Resource
|
|||||||
->reactive()
|
->reactive()
|
||||||
->required()
|
->required()
|
||||||
->disk('local')
|
->disk('local')
|
||||||
->directory('uploads/temp'),
|
->directory('uploads/InvoiceInTransit'),
|
||||||
])
|
])
|
||||||
->action(function (array $data) {
|
->action(function (array $data) {
|
||||||
InvoiceInTransit::truncate();
|
InvoiceInTransit::truncate();
|
||||||
@@ -270,7 +270,7 @@ class InvoiceInTransitResource extends Resource
|
|||||||
// Get original filename
|
// Get original filename
|
||||||
$originalName = $uploadedFile->getClientOriginalName();
|
$originalName = $uploadedFile->getClientOriginalName();
|
||||||
|
|
||||||
$path = $uploadedFile->storeAs('uploads/temp', $originalName, 'local'); // returns relative path
|
$path = $uploadedFile->storeAs('uploads/InvoiceInTransit', $originalName, 'local'); // returns relative path
|
||||||
|
|
||||||
$fullPath = Storage::disk('local')->path($path);
|
$fullPath = Storage::disk('local')->path($path);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user