public function order($id, $orderBy, $no) { // Actualizamos el registro con id $flag = 1; $this->setOrderItem($flag, $orderBy, $no); $directories = \App\Directory::find($id); $directories->order_by = $no; $directories->save(); Session::flash('message', 'Ordén del Directorio actualizado'); return redirect('/admin/directory', ['directories' => $directories]); }
public function aumentarHits($uri) { /*********** Hits section ************/ $modulo = new cms_section(); $modulo->whereuri($uri)->whereactive(1)->increment('hits'); /****************************/ /*********** Hits para categoria ******/ $categories = new cms_category(); $categories->whereuri($uri)->whereactive(1)->increment('hits'); /****************************/ /*********** Hits para documents ******/ $document = new cms_document(); $document->whereuri($uri)->whereactive(1)->increment('hits'); /****************************/ /*********** Hits para med_albums ******/ $media = new Media(); $media->whereuri($uri)->whereactive(1)->increment('hits'); /****************************/ /*********** Hits para med_pictures ******/ $media = new Item(); $media->whereuri($uri)->whereactive(1)->increment('hits'); /****************************/ /*********** Hits para med_pictures ******/ $directory = new Directory(); $directory->whereuri($uri)->whereactive(1)->increment('hits'); /****************************/ /*********** Hits para med_pictures ******/ $file = new ItemFiles(); $file->whereuri($uri)->whereactive(1)->increment('hits'); /****************************/ }
public function deleteFile($id) { $itemFiles = \App\ItemFile::find($id); $directories = \App\Directory::find($itemFiles->id_directory); $itemFiles->path = ""; $itemFiles->save(); Session::flash('message', 'Imagen Eliminada Correctamente'); return redirect('/admin/itemFilesedit/' . $itemFiles->id); }