Exemplo n.º 1
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     $dostukProgramList = \Model\Project\ModelName::where('dostuk', '=', '1')->lists('name', 'id')->toArray();
     $birinchiProgramList = \Model\Project\ModelName::where('birinchi', '=', '1')->lists('name', 'id')->toArray();
     $kyrgyzradioProgramList = \Model\Project\ModelName::where('kyrgyzradio', '=', '1')->lists('name', 'id')->toArray();
     return view('Admin::category.create', ['category' => new Category(), 'dostukProgramList' => $dostukProgramList, 'birinchiProgramList' => $birinchiProgramList, 'kyrgyzradioProgramList' => $kyrgyzradioProgramList]);
 }
Exemplo n.º 2
0
 public function project(\Model\Project\ModelName $project)
 {
     $projectList = \Model\Project\ModelName::get();
     $MediaCategories = \Model\MediaCategory\ModelName::get();
     $mediaAll = \Model\Media\ModelName::get();
     $mainBanner = \Model\Background\ModelName::where('name', '=', 'main')->first();
     $categories = \Model\Category\ModelName::all();
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     return view('Front::media.project', ['project' => $project, 'MediaCategories' => $MediaCategories, 'mainBanner' => $mainBanner, 'categories' => $categories, 'projectList' => $projectList, 'backgroundMain' => $backgroundMain]);
 }
Exemplo n.º 3
0
 public function projectVideos(Request $request, $project)
 {
     $channel = \Model\Channel\ModelName::name('balastan')->first();
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     $programId = $project;
     $balastanLastVideo = \Model\Media\ModelName::where('program', '=', $programId)->take(1)->orderBy('id', 'desc')->first();
     $balastaProjects = \Model\Project\ModelName::where('balastan', '=', '1')->orderBy('id', 'desc')->get();
     $balastanMedias = \Model\Media\ModelName::where('program', '=', $programId)->take(8)->skip(0)->orderBy('id', 'desc')->get();
     return view('Front::channel.balastan.video', ['channel' => $channel, 'backgroundMain' => $backgroundMain, 'balastanLastVideo' => $balastanLastVideo, 'balastanProjects' => $balastaProjects, 'balastanMedias' => $balastanMedias]);
 }
Exemplo n.º 4
0
 public function project(\Model\Project\ModelName $project)
 {
     $projectList = \Model\Project\ModelName::get();
     //        $MediaCategory = \Model\MediaCategory\ModelName::get();
     $mediaAll = \Model\Media\ModelName::get();
     $mainBanner = \Model\Background\ModelName::where('name', '=', 'main')->first();
     $categories = \Model\Category\ModelName::all();
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     $relatedNews = \Model\Project\ModelName::where('published', '=', true)->where('dostuk', '=', $project->id)->get();
     $dostukProjects = \Model\Project\ModelName::where('published', '=', true)->where('dostuk', '=', 1)->get();
     return view('Front::channel.dostuk.project', ['project' => $project, 'mainBanner' => $mainBanner, 'categories' => $categories, 'projectList' => $projectList, 'backgroundMain' => $backgroundMain, 'relatedNews' => $relatedNews, 'dostukProjects' => $dostukProjects]);
 }
Exemplo n.º 5
0
 public function allnews()
 {
     $channel = \Model\Channel\ModelName::name('kyrgyzradio')->first();
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     $lc = app()->getlocale();
     if ($lc == 'kg') {
         $allPost = \Model\Post\ModelName::where('kyrgyzradio', '=', 1)->languagekg()->published()->orderBy('id', 'desc')->get();
     } else {
         $allPost = \Model\Post\ModelName::where('kyrgyzradio', '=', 1)->languageru()->published()->orderBy('id', 'desc')->get();
     }
     $kyrgyzradioProjects = \Model\Project\ModelName::where('published', '=', true)->where('kyrgyzradio', '=', 1)->get();
     return view('Front::channel.kyrgyzradio.allnews', ['channel' => $channel, 'backgroundMain' => $backgroundMain, 'allPost' => $allPost, 'kyrgyzradioProjects' => $kyrgyzradioProjects]);
 }
Exemplo n.º 6
0
 public function getProgramName()
 {
     $lc = app()->getlocale();
     $programId = $this->program;
     $programName = \Model\Project\ModelName::where('id', '=', $programId)->first();
     if ($programName != null) {
         $name = $programName->name;
         $nameRu = $programName->nameRu;
         if ($lc == 'kg' && $name != '') {
             return $name;
         } else {
             return $nameRu;
         }
     }
 }
Exemplo n.º 7
0
 public function allphotos()
 {
     $channel = \Model\Channel\ModelName::name('madaniyat')->first();
     $perPage = 24;
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     $postAll = \Model\Media\ModelName::where('published', '=', true)->where('madaniyat', '=', '1')->orderBy('id', 'desc')->paginate($perPage);
     $lc = app()->getlocale();
     if ($lc == 'kg') {
         $madaniyatProjects = \Model\Project\ModelName::where('published', '=', true)->where('madaniyat', '=', 1)->where('name', '<>', '')->get();
     } else {
         $madaniyatProjects = \Model\Project\ModelName::where('published', '=', true)->where('madaniyat', '=', 1)->where('nameRu', '<>', '')->get();
     }
     // Photo Gallery
     $photoGalleries = \Model\PhotoParent\ModelName::where('madaniyat', '=', '1')->where('published', '=', true)->take('10')->orderBy('id', 'desc')->get();
     return view('Front::channel.madaniyat.allphotos', ['channel' => $channel, 'backgroundMain' => $backgroundMain, 'photoGalleries' => $photoGalleries, 'postAll' => $postAll, 'perPage' => $perPage, 'madaniyatProjects' => $madaniyatProjects]);
 }
Exemplo n.º 8
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function Home()
 {
     $lc = app()->getlocale();
     $channel = \Model\Channel\ModelName::general();
     if ($lc == 'kg') {
         $generalPosts = \Model\Post\ModelName::general($channel)->published()->languagekg()->take(6)->skip(0)->orderBy('id', 'desc')->get();
         $projects = \Model\Project\ModelName::having('name', '<>', '')->get();
     } elseif ($lc == 'ru') {
         $generalPosts = \Model\Post\ModelName::general($channel)->published()->languageru()->take(6)->skip(0)->orderBy('id', 'desc')->get();
         $projects = \Model\Project\ModelName::where('nameRu', '<>', '')->get();
     }
     $rDayVideo = \Model\Media\ModelName::having('dayVideo', '=', '1')->take(1)->skip(0)->orderBy('created_at', 'desc')->first();
     if ($rDayVideo != null) {
         $dayVideo = $rDayVideo;
     } elseif ($rDayVideo == null) {
         $dayVideoResult = \Model\Media\ModelName::take(1)->skip(0)->orderBy('id', 'desc')->first();
         if ($dayVideoResult != null) {
             $dayVideo = $dayVideoResult;
         } else {
             $dayVideo = 'KhJUlC4aJZM';
         }
     }
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     $peopleReporters = \Model\PeopleReporter\ModelName::where('published', '=', true)->get();
     // FotoParent - photo gallery
     $photoParent = \Model\PhotoParent\ModelName::where('published', '=', true)->first();
     if ($photoParent != null) {
         $images = json_decode($photoParent->images);
         // array of images
     } else {
         $images = 1;
     }
     $MediaCategories = \Model\MediaCategory\ModelName::get();
     $mediaPosts = \Model\Media\ModelName::orderBy('id', 'desc')->get();
     $categoriesVideos = array();
     foreach ($MediaCategories as $MediaCategory) {
         $CategoryVideos = \Model\Media\ModelName::where('videoType', '=', $MediaCategory->videoType)->orderBy('id', 'desc')->take(9)->get();
         $categoriesVideos = array_add($categoriesVideos, $MediaCategory->videoType, $CategoryVideos);
     }
     $mediaLastVideos = \Model\Media\ModelName::orderBy('id', 'desc')->take(9)->get();
     return view('Front::home', ['images' => $images, 'generalPosts' => $generalPosts, 'dayVideo' => $dayVideo, 'positionTop' => $this->positionTop, 'positionRight' => $this->positionRight, 'positionCenter' => $this->positionCenter, 'positionBottom' => $this->positionBottom, 'peopleReporters' => $peopleReporters, 'backgroundMain' => $backgroundMain, 'MediaCategories' => $MediaCategories, 'categoriesVideos' => $categoriesVideos, 'mediaLastVideos' => $mediaLastVideos, 'projects' => $projects]);
 }
Exemplo n.º 9
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit(Media $media)
 {
     $projectList = \Model\Project\ModelName::lists('name', 'id')->toArray();
     return view('Admin::media.edit', ['media' => $media, 'projectList' => $projectList]);
 }
Exemplo n.º 10
0
 public function Gallery(Request $request, $galleryId)
 {
     $gallery = \Model\PhotoParent\ModelName::where('dostuk', '=', '1')->where('id', '=', $galleryId)->first();
     $images = json_decode($gallery->images);
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     $dostukProjects = \Model\Project\ModelName::where('published', '=', true)->where('dostuk', '=', 1)->get();
     return view('Front::channel.dostuk.photos', ['images' => $images, 'backgroundMain' => $backgroundMain, 'gallery' => $gallery, 'dostukProjects' => $dostukProjects]);
 }
Exemplo n.º 11
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy(Project $project)
 {
     $project->delete();
     return redirect()->route('admin.project.index');
 }
Exemplo n.º 12
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function Home()
 {
     $lc = app()->getlocale();
     $channel = \Model\Channel\ModelName::general();
     $channels = \Model\Channel\ModelName::take(8)->skip(1)->get();
     if ($lc == 'kg') {
         $generalPosts = \Model\Post\ModelName::general($channel)->published()->where('general', '=', '1')->languagekg()->take(6)->skip(0)->orderBy('number', 'asc')->get();
         $projects = \Model\Project\ModelName::having('name', '<>', '')->get();
         $directorPosts = \Model\Post\ModelName::where('director', '=', '1')->orderBy('id', 'desc')->take(3)->languagekg()->get();
         $reporterPosts = \Model\Post\ModelName::where('reporter', '=', '1')->orderBy('id', 'desc')->take(15)->languagekg()->get();
     } elseif ($lc == 'ru') {
         $generalPosts = \Model\Post\ModelName::general($channel)->published()->where('general', '=', '1')->languageru()->take(6)->skip(0)->orderBy('number', 'asc')->get();
         $projects = \Model\Project\ModelName::where('nameRu', '<>', '')->get();
         $directorPosts = \Model\Post\ModelName::where('director', '=', '1')->orderBy('id', 'desc')->take(3)->languageru()->get();
         $reporterPosts = \Model\Post\ModelName::where('reporter', '=', '1')->orderBy('id', 'desc')->take(15)->languageru()->get();
     }
     if ($lc == 'kg') {
         $latestPosts = \Model\Post\ModelName::general($channel)->published()->where('general', '=', '1')->languagekg()->take(6)->skip(0)->orderBy('id', 'desc')->get();
     } elseif ($lc == 'ru') {
         $latestPosts = \Model\Post\ModelName::general($channel)->published()->where('general', '=', '1')->languageru()->take(6)->skip(0)->orderBy('id', 'desc')->get();
     }
     $dayVideo1 = \Model\Media\ModelName::where('dayVideo', '=', '1')->first();
     $dayVideo2 = \Model\Media\ModelName::where('dayVideo', '=', '2')->first();
     $dayVideo3 = \Model\Media\ModelName::where('dayVideo', '=', '3')->first();
     $dayVideo4 = \Model\Media\ModelName::where('dayVideo', '=', '4')->first();
     $dayVideo5 = \Model\Media\ModelName::where('dayVideo', '=', '5')->first();
     if ($dayVideo1) {
         $dayVideo1 = $dayVideo1;
     } else {
         $dayVideo1 = '';
     }
     if ($dayVideo2) {
         $dayVideo2 = $dayVideo2;
     } else {
         $dayVideo2 = '';
     }
     if ($dayVideo3) {
         $dayVideo3 = $dayVideo3;
     } else {
         $dayVideo3 = '';
     }
     if ($dayVideo4) {
         $dayVideo4 = $dayVideo4;
     } else {
         $dayVideo4 = '';
     }
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     $peopleReporters = \Model\PeopleReporter\ModelName::where('published', '=', true)->get();
     // Photo Gallery
     $photoGalleries = \Model\PhotoParent\ModelName::where('extracolumn', '=', '1')->where('published', '=', true)->take('10')->orderBy('id', 'desc')->get();
     $MediaCategories = \Model\MediaCategory\ModelName::orderBy('id', 'asc')->get();
     $mediaPosts = \Model\Media\ModelName::orderBy('id', 'desc')->get();
     $categoriesVideos = array();
     foreach ($MediaCategories as $MediaCategory) {
         $CategoryVideos = \Model\Media\ModelName::where('videoType', '=', $MediaCategory->videoType)->orderBy('id', 'desc')->take(9)->get();
         $categoriesVideos = array_add($categoriesVideos, $MediaCategory->videoType, $CategoryVideos);
     }
     $mediaLastVideos = \Model\Media\ModelName::orderBy('id', 'desc')->take(9)->get();
     $defaultVideo = 'rjXSurFi8uQ';
     return view('Front::home', ['generalPosts' => $generalPosts, 'dayVideo1' => $dayVideo1, 'dayVideo2' => $dayVideo2, 'dayVideo3' => $dayVideo3, 'dayVideo4' => $dayVideo4, 'defaultVideo' => $defaultVideo, 'positionTop' => $this->positionTop, 'positionRight' => $this->positionRight, 'positionLeft' => $this->positionLeft, 'positionCenter' => $this->positionCenter, 'positionBottom' => $this->positionBottom, 'peopleReporters' => $peopleReporters, 'photoGalleries' => $photoGalleries, 'backgroundMain' => $backgroundMain, 'MediaCategories' => $MediaCategories, 'categoriesVideos' => $categoriesVideos, 'mediaLastVideos' => $mediaLastVideos, 'projects' => $projects, 'directorPosts' => $directorPosts, 'reporterPosts' => $reporterPosts, 'latestPosts' => $latestPosts, 'channels' => $channels]);
 }
Exemplo n.º 13
0
 public function allVideos()
 {
     $projectList = \Model\Project\ModelName::where('extracolumn', '=', '1')->orderBy('id', 'desc')->get();
     $mainBanner = \Model\Background\ModelName::where('name', '=', 'main')->first();
     $categories = \Model\Category\ModelName::all();
     $backgroundMain = \Model\Background\ModelName::where('published', '=', true)->first();
     $perPage = 15;
     $allVideos = \Model\Media\ModelName::where('published', '=', true)->orderBy('id', 'desc')->paginate($perPage);
     return view('Front::media.all', ['perPage' => $perPage, 'mainBanner' => $mainBanner, 'categories' => $categories, 'projectList' => $projectList, 'backgroundMain' => $backgroundMain, 'allVideos' => $allVideos, 'positionTop' => $this->positionTop, 'positionRight' => $this->positionRight, 'positionCenter' => $this->positionCenter, 'positionBottom' => $this->positionBottom, 'positionLeft' => $this->positionLeft]);
 }
Exemplo n.º 14
0
 /**
  * Show the form for editing the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function edit(Post $post)
 {
     $channelList = \Model\Channel\ModelName::lists('display', 'id')->toArray();
     $categoryList = \Model\Category\ModelName::lists('titleRu', 'id')->toArray();
     $PhotoParentList = \Model\PhotoParent\ModelName::lists('name', 'id')->toArray();
     $relatedPosts = \Model\Post\ModelName::where('title', '<>', '')->where('id', '<>', $post->id)->lists('title', 'id')->toArray();
     $relatedPosts2 = \Model\Post\ModelName::where('titleRu', '<>', '')->where('id', '<>', $post->id)->lists('titleRu', 'id')->toArray();
     $dostukProgramList = \Model\Project\ModelName::where('dostuk', '=', '1')->lists('name', 'id')->toArray();
     $birinchiProgramList = \Model\Project\ModelName::where('birinchi', '=', '1')->lists('name', 'id')->toArray();
     $kyrgyzradioProgramList = \Model\Project\ModelName::where('kyrgyzradio', '=', '1')->lists('name', 'id')->toArray();
     $tags = \Model\Tag\Tag::lists('name', 'id');
     $tags2 = \Model\Tag\Tag::lists('name', 'id');
     return view('Admin::post.edit', ['post' => $post, 'tags' => $tags, 'tags2' => $tags2, 'relatedPosts' => $relatedPosts, 'relatedPosts2' => $relatedPosts2, 'channelList' => $channelList, 'categoryList' => $categoryList, 'PhotoParentList' => $PhotoParentList, 'dostukProgramList' => $dostukProgramList, 'birinchiProgramList' => $birinchiProgramList, 'kyrgyzradioProgramList' => $kyrgyzradioProgramList]);
 }