app/Http/Controllers/ClassController.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()
    {
        if (!Cache::has('classes')) {
            Cache::put('classes', Classes::all(), 60);
        }
        $items = Cache::get('classes');
        $items = Classes::orderBy('id', 'desc')->paginate(5);
        return view('classes.index', array('items' => $items));
    }
public function index ( ) { $ items = Classes :: orderBy ( 'id' , 'desc' ) -> paginate ( 5 ) ; return view ( 'classes.index' , array ( 'items' => $ items ) ) ; }
Display a listing of the resource.
Display a listing of the resource .
// //        if (!Cache::has('classes')) { //            Cache::put('classes', Classes::all(), 60); //        } //        $items = Cache::get('classes');