app/Http/Controllers/API/CardController.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()
    {
        $cards = Cards::where(array('avaliable' => 0))->with('company')->distinct('card_price')->get()->unique('card_price');
        return $this->apiResponse($cards, 200);
    }
public function index ( ) { $ cards = Cards :: where ( array ( 'avaliable' => 0 ) ) -> with ( 'company' ) -> distinct ( 'card_price' ) -> get ( ) -> unique ( 'card_price' ) ; return $ this -> apiResponse ( $ cards , 200 ) ; }
Display a listing of the resource.
Display a listing of the resource .