From 7db0ab7e698e19f5c19431260d405a5258578517 Mon Sep 17 00:00:00 2001 From: Stojan Kukrika Date: Thu, 12 Feb 2015 15:28:41 +0100 Subject: [PATCH] small fix in video controller --- app/Http/Controllers/Admin/VideoController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/Admin/VideoController.php b/app/Http/Controllers/Admin/VideoController.php index 2415c92a..726e4857 100644 --- a/app/Http/Controllers/Admin/VideoController.php +++ b/app/Http/Controllers/Admin/VideoController.php @@ -26,7 +26,7 @@ public function index() } /** - * Show a list of all the photo posts. + * Show a list of all the video posts. * * @return View */ @@ -105,7 +105,7 @@ public function getEdit($id) $languages = Language::all(); $language = $video->language_id; $videoalbums = VideoAlbum::all(); - $videoalbum = $video->photo_album_id; + $videoalbum = $video->video_album_id; return view('admin.video.create_edit',compact('video','languages','language','videoalbums','videoalbum')); } @@ -145,7 +145,7 @@ public function postEdit(VideoRequest $request, $id) if(Input::hasFile('video')) { - $videoalbum = VideoAlbum::find($request->photo_album_id); + $videoalbum = VideoAlbum::find($request->video_album_id); $destinationPath = public_path() . '/images/videoalbum/'.$videoalbum->folderid.'/'; Input::file('video')->move($destinationPath, $video_file); } @@ -207,14 +207,14 @@ public function getAlbumCover($id,$album=0) */ public function data($albumid=0) { $condition =(intval($albumid)==0)?">":"="; - $photoalbum = Video::join('language', 'language.id', '=', 'video.language_id') + $videoalbum = Video::join('language', 'language.id', '=', 'video.language_id') ->join('video_album', 'video_album.id', '=', 'video.video_album_id') ->where('video.video_album_id',$condition,$albumid) ->orderBy('video.position') ->select(array('video.id',DB::raw($albumid . ' as albumid'), 'video.name','video_album.name as category', 'video.album_cover','language.name as language', 'video.created_at')); - return Datatables::of($photoalbum) + return Datatables::of($videoalbum) -> edit_column('album_cover', '@if ($album_cover=="1") @else @endif') -> add_column('actions', ' {{ Lang::get("admin/modal.edit") }} {{ Lang::get("admin/modal.delete") }}