1 | <?php |
||
10 | class ImagesTableSeeder extends Seeder |
||
11 | { |
||
12 | /** |
||
13 | * Lookup table to map images to projects. |
||
14 | * |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $projectLookup = [ |
||
18 | 'a' => 1, |
||
19 | 'b' => 2, |
||
20 | 'c' => 3, |
||
21 | 'd' => 4, |
||
22 | 'e' => 5, |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * Run the database seeds. |
||
27 | */ |
||
28 | public function run() |
||
52 | |||
53 | /** |
||
54 | * Move image file to storage. |
||
55 | * |
||
56 | * @param \Symfony\Component\Finder\SplFileInfo $image File info. |
||
57 | * @param string $path Path to move to. |
||
58 | * @param \Illuminate\Filesystem\Filesystem $filesystem |
||
59 | */ |
||
60 | protected function moveImage($image, $path, $filesystem) |
||
68 | |||
69 | /** |
||
70 | * Add image to a project. |
||
71 | * |
||
72 | * @param string $name Original filename. |
||
73 | * @param string $path Path to image. |
||
74 | */ |
||
75 | protected function addToProject($name, $path) |
||
85 | } |
||
86 |