app/Http/Controllers/BeritaController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create()
    {
      if (Auth::check()) {
        $countBerita = Berita::where('status', 2)
        ->count();
        $countGaleri = Galeri::where('status', 2)
        ->count();
        $countSantri = Santri::where('status', 2)
        ->count();
        $countVideo = Video::where('status', 2)
        ->count();
        return view('content.berita.create.0index', compact(
          'countBerita',
          'countGaleri',
          'countSantri',
          'countVideo',
        ));
      } else {
        return redirect()->route('login');
      }
    }
public function create ( ) { if ( Auth :: check ( ) ) { $ countBerita = Berita :: where ( 'status' , 2 ) -> count ( ) ; $ countGaleri = Galeri :: where ( 'status' , 2 ) -> count ( ) ; $ countSantri = Santri :: where ( 'status' , 2 ) -> count ( ) ; $ countVideo = Video :: where ( 'status' , 2 ) -> count ( ) ; return view ( 'content.berita.create.0index' , compact ( 'countBerita' , 'countGaleri' , 'countSantri' , 'countVideo' , ) ) ; } else { return redirect ( ) -> route ( 'login' ) ; } }
Show the form for creating a new resource.
Show the form for creating a new resource .