Esempio n. 1
0
 /**
  * @param $id
  * @return mixed
  */
 public function getMediaById($id)
 {
     try {
         return $this->repository->findById($id);
     } catch (\CoandaCMS\Coanda\Media\Exceptions\MediaNotFound $exception) {
         return false;
     }
 }
 /**
  * @param $media_id
  * @return mixed
  */
 public function getRemove($media_id)
 {
     Coanda::checkAccess('media', 'remove');
     try {
         $media = $this->mediaRepository->findById($media_id);
         return View::make('coanda::admin.modules.media.remove', ['media' => $media]);
     } catch (MediaNotFound $exception) {
         App::abort('404');
     }
 }