app/Http/Controllers/Api/ExerciseCategoryController.php
/**
     * Display a listing of the resource.
     *
     * @param ExerciseCategoryTransformer $transformer
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@param ExerciseCategoryTransformer $transformer
@return \Illuminate\Http\Response
Display a listing of the resource . @param ExerciseCategoryTransformer $transformer @return \ Illuminate \ Http \ Response
public function index(ExerciseCategoryTransformer $transformer)
    {
        $categories = ExerciseCategory::where('active', 1)->orderBy('category_name')->get();
        return $this->respond([
            'data' => $transformer->transformCollection($categories->toArray())
        ]);
    }
public function index ( ExerciseCategoryTransformer $ transformer ) { $ categories = ExerciseCategory :: where ( 'active' , 1 ) -> orderBy ( 'category_name' ) -> get ( ) ; return $ this -> respond ( [ 'data' => $ transformer -> transformCollection ( $ categories -> toArray ( ) ) ] ) ; }
Display a listing of the resource.
Display a listing of the resource .