protected function __checkDuplicateUrl($id, $album_id, $url)
 {
     if (Gallery::where('id', '!=', $id)->where('albums_id', $album_id)->where('url', $url)->count() == 0) {
         return true;
     }
     return false;
 }
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int $id
  * @return Response
  */
 public function EditAction($id)
 {
     $this->media = Media::find($id);
     $this->gallery = Gallery::select('title', 'id')->orderBy('title', 'asc')->get();
     return view('admin.media.media_edit', ['media' => $this->media, 'gallery' => $this->gallery]);
 }