importPath() публичный Метод

Create a Media record for a file already on a disk.
public importPath ( string $disk, string $path ) : Media
$disk string
$path string Path to file, relative to disk root
Результат Media
Пример #1
0
 /**
  * Generate a new media record.
  * @param  string $disk
  * @param  string $path
  * @return void
  */
 protected function createRecordForFile($disk, $path)
 {
     try {
         $this->uploader->importPath($disk, $path);
         ++$this->counters['created'];
         $this->info("Created Record for file at {$path}", 'v');
     } catch (MediaUploadException $e) {
         $this->warn($e->getMessage(), 'vvv');
         ++$this->counters['skipped'];
         $this->info("Skipped file at {$path}", 'v');
     }
 }