https://github.com/26b/laravel-dynamic-panels
Provides an area on your website to display panels dynamically.
https://github.com/26b/laravel-dynamic-panels
laravel-package livewire-component
Last synced: 3 months ago
JSON representation
Provides an area on your website to display panels dynamically.
- Host: GitHub
- URL: https://github.com/26b/laravel-dynamic-panels
- Owner: 26B
- License: mit
- Created: 2022-06-29T11:58:08.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-09T11:20:47.000Z (over 2 years ago)
- Last Synced: 2025-03-16T05:02:39.622Z (over 1 year ago)
- Topics: laravel-package, livewire-component
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Dynamic Panels
Provides an area on your website to display panels dynamically.
Currently supports:
- Random panel loading.
- Manual panel changing.
- Timer based panel changing.
Requires:
- Livewire
- AlpineJS
## Getting started
Require the package
```
composer require 26b/laravel-dynamic-panels
```
## Usage
Create as many livewire components as you want, where you overload the method `getPanels()` with a list of the panels you want to display.
```php
namespace App\Livewire\DynamicPanels;
use TwentySixB\LaravelDynamicPanels\Livewire\PanelContainer;
class Container extends PanelContainer
{
/**
* @inheritDoc
*
* @return array
*/
public function getPanels() : array
{
return [
'livewire:profile-completion-panel',
'did-you-know',
'app-install',
];
}
}
```
Next, on your blade view, call the livewire component.
```html
```
## Customizing
Publish the configuration file should you need to customise it.
```
php artisan vendor:publish --tag=dynamic-panels-views
```