Skip to content
Discussion options

You must be logged in to vote

Not sure if you want to do this, but take a look

Select::make('select')
    ->reactive()
    ->searchable()
    ->getSearchResultsUsing(function (string $search): array {
        $url = 'https://jsonplaceholder.typicode.com/users?address.city=' . $search;
        $response = Http::get($url)->json();
        $response = Arr::pluck($response, 'name', 'id');
        return $response;
    })

type Howemouth
It will show the names from Howemouth city.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@leandrocfe
Comment options

@Hegabovic
Comment options

@Hegabovic
Comment options

@leandrocfe
Comment options

Answer selected by Hegabovic
@Hegabovic
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants