public function run()
 {
     DB::table('availability_page')->delete();
     $success = File::cleanDirectory($this->getImagesPath());
     File::put($this->getImagesPath() . '.gitignore', File::get(public_path() . '/../app/storage/cache/.gitignore'));
     AvailabilityPage::create(['image_name' => ""]);
 }
Ejemplo n.º 2
0
 public function getAvailability()
 {
     $objects = Object::where('shown', '=', 1)->get();
     $availabilityPage = AvailabilityPage::first();
     return View::make('site.availability', array('objects' => $objects, 'availabilityPage' => $availabilityPage));
 }
Ejemplo n.º 3
0
 public function deleteAvailabilityPageImage()
 {
     $availabilityPage = AvailabilityPage::first();
     $path = AvailabilityPage::IMAGES_FOLDER . $availabilityPage->image_name;
     $availabilityPage->update(array('image_name' => ''));
     $this->deleteImageFromFileSystem($path);
 }