app/Http/Controllers/TheBlog/CategoryController.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()
    {
        $allCategories = Category::all();
        return $this->sendResponse(CategoryResource::collection($allCategories), 'allCategories retrieved successfully.');
    }
public function index ( ) { $ allCategories = Category :: all ( ) ; return $ this -> sendResponse ( CategoryResource :: collection ( $ allCategories ) , 'allCategories retrieved successfully.' ) ; }
Display a listing of the resource.
Display a listing of the resource .
//