src/Http/Controllers/CmsCategoryController.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()
    {
        $categories = CmsCategory::withCount('cms_posts')->latest()->paginate(config('cms.paginated_data'))->withQueryString();
        return view('cms::categories.index', compact('categories'));
    }
public function index ( ) { $ categories = CmsCategory :: withCount ( 'cms_posts' ) -> latest ( ) -> paginate ( config ( 'cms.paginated_data' ) ) -> withQueryString ( ) ; return view ( 'cms::categories.index' , compact ( 'categories' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .