Livewire components for resources

v0.2.8 2023-03-24 08:16 UTC

This package is auto-updated.

Last update: 2023-03-25 12:17:09 UTC


Latest Stable Version Total Downloads Latest Unstable Version License

Search for entities in authority databases and link them with your local data.

  • Anton
  • Geonames
  • GND
  • Idiotikon
  • Metagrid
  • Wikidata
  • Wikipedia


Via Composer

$ composer require kraenzle-ritter/resources-component

To use this package install also kraenzle-ritter/resources.

In your views you can use the package then like this:

@livewire('resources-list', [$model, 'deleteButton' => true])
@livewire('provider-select', [$model, $providers', 'actors'])

The $model is the model which should become resourceable.

$providers is a list (array) of actually used resource providers. You can pass them by the controller or via a config file. Actual available are any anton installation (see below), geonames, gnd, metagrid, wikipedia, wikidata.

The last parameter for the provider-select is the endpoint, that is the entity. You only need this at this time if you use anton as a provider.

The components fire an event (ResourceSaved) when saving a resource. So you can define and register a listener in your app:


namespace App\Listeners;

use KraenzleRitter\ResourcesComponents\Events\ResourceSaved;

class UpdateLocationWithGeonamesCoordinates

    public function handle(ResourceSaved $event)
        if ($this->resource->provider == 'geonames') {


In your EventServiceProvider:

namespace App\Providers;

use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use KraenzleRitter\ResourcesComponents\Events\ResourceSaved;
use App\Listeners\UpdateLocationWithGeonamesCoordinates;

class EventServiceProvider extends ServiceProvider

     * The event listener mappings for the application.
     * @var array
    protected $listen = [
        ResourceSaved::class => [

.env Variables

For some providers you need set some variables in your .env file:




The model should have a resources_search attribute or a name attribute.


Just put the component in your view:

@livewire('gnd-lw-component', ['params' => ['queryOptions' => ['size' => 5]]])


MIT. Please see the license file for more information.