type ?? null; if($type){ $tarifs = Tarif::where('type', $type)->orderBy('lft', 'desc')->get(); }else{ $tarifs = Tarif::orderBy('lft', 'desc')->get(); } return $this->respondWithCollection($tarifs, new TarifTransformer($this->locale)); } }