app/Http/Controllers/LandingController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
      $galeri = Galeri::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(5)
                    ->get();
      $berita0 = Berita::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(1)
                    ->get();
      $berita1 = Berita::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(1)
                    ->skip(1)
                    ->get();
      $berita2 = Berita::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(1)
                    ->skip(2)
                    ->get();
      $berita3 = Berita::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(1)
                    ->skip(3)
                    ->get();
      $berita4 = Berita::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(1)
                    ->skip(4)
                    ->get();
      $captionVideo = Information::where('id', 1)
                    ->get();
      $video0 = Video::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(1)
                    ->get();
      $video1 = Video::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(1)
                    ->skip(1)
                    ->get();
      $video2 = Video::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(1)
                    ->skip(2)
                    ->get();
      $iklanTopPost = Information::where('id', 2)
                    ->get();
      $santri = Santri::orderBy('updated_at', 'desc')
                    ->where('status', 2)
                    ->take(3)
                    ->get();
      return view('content.landing.0landing', compact(
                                                  'galeri',
                                                  'berita0',
                                                  'berita1',
                                                  'berita2',
                                                  'berita3',
                                                  'berita4',
                                                  'captionVideo',
                                                  'video0',
                                                  'video1',
                                                  'video2',
                                                  'iklanTopPost',
                                                  'santri',
                                                ));
    }
public function index ( ) { $ galeri = Galeri :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 5 ) -> get ( ) ; $ berita0 = Berita :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 1 ) -> get ( ) ; $ berita1 = Berita :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 1 ) -> skip ( 1 ) -> get ( ) ; $ berita2 = Berita :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 1 ) -> skip ( 2 ) -> get ( ) ; $ berita3 = Berita :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 1 ) -> skip ( 3 ) -> get ( ) ; $ berita4 = Berita :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 1 ) -> skip ( 4 ) -> get ( ) ; $ captionVideo = Information :: where ( 'id' , 1 ) -> get ( ) ; $ video0 = Video :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 1 ) -> get ( ) ; $ video1 = Video :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 1 ) -> skip ( 1 ) -> get ( ) ; $ video2 = Video :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 1 ) -> skip ( 2 ) -> get ( ) ; $ iklanTopPost = Information :: where ( 'id' , 2 ) -> get ( ) ; $ santri = Santri :: orderBy ( 'updated_at' , 'desc' ) -> where ( 'status' , 2 ) -> take ( 3 ) -> get ( ) ; return view ( 'content.landing.0landing' , compact ( 'galeri' , 'berita0' , 'berita1' , 'berita2' , 'berita3' , 'berita4' , 'captionVideo' , 'video0' , 'video1' , 'video2' , 'iklanTopPost' , 'santri' , ) ) ; }
Display a listing of the resource.
Display a listing of the resource .