|
|
@@ -35,7 +35,7 @@ class GenerateDocumentsService
|
|
|
*/
|
|
|
public function generateInstallationPack(Order $order, int $userId): string
|
|
|
{
|
|
|
- $techDocsPath = base_path('/tech-docs/');
|
|
|
+ $techDocsPath = public_path('/images/tech-docs/');
|
|
|
$order = Order::query()
|
|
|
->withoutGlobalScope(\App\Models\Scopes\YearScope::class)
|
|
|
->whereKey($order->id)
|
|
|
@@ -56,7 +56,7 @@ class GenerateDocumentsService
|
|
|
$articles[] = $sku->product->article;
|
|
|
// find and copy scheme files to installation directory
|
|
|
if (file_exists($techDocsPath . $sku->product->article . '/')) {
|
|
|
- foreach (Storage::disk('base')->allFiles('tech-docs/' . $sku->product->article) as $p) {
|
|
|
+ foreach (Storage::disk('base')->allFiles('public/images/tech-docs/' . $sku->product->article) as $p) {
|
|
|
$content = Storage::disk('base')->get($p);
|
|
|
Storage::disk('public')->put('orders/' . $order->id . '/tmp/Схемы сборки/' . basename($p), $content);
|
|
|
}
|