Skip to content

Commit

Permalink
add requirements to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
csrui committed Jun 29, 2022
1 parent f4506a3 commit 0eb85e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Currently supports:
- Manual panel changing.
- Timer based panel changing.

Requires:

- Livewire
- AlpineJS

## Getting started

Require the package
Expand All @@ -16,10 +21,9 @@ 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.
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\Http\Livewire\DynamicPanels;
Expand All @@ -45,6 +49,12 @@ class Container extends PanelContainer
}
```

Next, on your blade view, call the livewire component.

```html
<livewire:dynamic-panels.container />
```

## Customizing

Publish the configuration file should you need to customise it.
Expand Down
2 changes: 0 additions & 2 deletions resources/views/components/container.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
}
setInterval(() => {
console.log('coio');
$wire.next();
}, this.interval)
},
}"
x-init="loop"
>

{{ $slot }}
</div>

0 comments on commit 0eb85e2

Please sign in to comment.