[ 'display_name' => 'Phone number', 'options' => [ 'replace_with' => [ '#', '*', 'x', ] ] ], 'email' => [ 'display_name' => 'Email', 'options' => [ 'replace_with' => [ '#', '*', 'x', ], 'include_domain' => [ true, false ] ] ] ]; /** * Create a new filter * * @return JsonResponse * * @throws BindingResolutionException */ public function create(): JsonResponse { return response()->json([ 'result' => 'success' ]); } /** * Get one or all the filters we have * * @param string|null $id The ID of the filter. Null if we want all of them * * @return JsonResponse * * @throws BindingResolutionException */ public function get(string $id = null): JsonResponse { if ($id === null) { return response()->json(static::$filters); } if (!empty(static::$filters[$id])) { return response()-> json(static::$filters[$id]); } abort(404); } }