This tile can be used on the Laravel Dashboard to display the next departure of busses from a bus station in Münster.
You can install the package via composer:
composer require pschocke/laravel-dashboard-stadtwerke-muenster-bus-tile
In the dashboard
config file, you must add this configuration in the tiles
key. The stations
should contain an internal name for the station and all IDs of the bus stations that you want to display on one tile. You can add as many stations as you want.
You can find all stations and their ids here.
// in config/dashboard.php
return [
// ...
'tiles' => [
'muenster-bus' => [
'stations' => [
'ludgeri' => 4102102,
'schulzentrum' => [4725102, 4725101],
'Friedrich-Ebert-Platz' => 4357102
]
]
]
];
In app\Console\Kernel.php
you should schedule the \Pschocke\MuensterBusTile\FetchMuensterBusStationsCommand
to run. You can let it run every minute if you want. You could also run it less frequently if fast updates on the dashboard aren't that important for this tile.
// in app/console/Kernel.php
protected function schedule(Schedule $schedule)
{
// ...
$schedule->command(\Pschocke\MuensterBusTile\FetchMuensterBusStationsCommand::class)->everyMinute();
}
In your dashboard view you use the livewire:citybikes-tile
component. You need to specify the stations internal name defined in your config and a display name.
<x-dashboard>
<livewire:muenster-bus-tile position="b2:b4" station="schulzentrum" name="Hiltrup Schulzentrum"/>
</x-dashboard>
If you want to customize the view used to render this tile, run this command:
php artisan vendor:publish --provider="Pschocke\MuensterBusTile\MuensterBusTileServiceProvider" --tag="dashboard-muenster-bus-tile-views"
composer test
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.