<?php
use PhpOffice\PhpSpreadsheet\Reader\Xlsx as XlsxReader;
use Illuminate\Database\Seeder;
class DeliveryRoutesTableSeeder extends Seeder {
public function run() {
$customersPerRouteFile = storage_path("customers_per_delivery_route.xlsx");
$reader = new XlsxReader();
$reader->setReadDataOnly(true);
$spreadsheet = $reader->load($customersPerRouteFile);
dd($spreadsheet);
factory(App\DeliveryRoute::class)->create();
}
}
Hi, that file exists will full access permissions. It is stored in /storage Laravel framework directory. What am I missing from this. The absolute path checkout from the terminal. Kindly assist.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire