Skip to content

Provides an area on your website to display panels dynamically.

License

Notifications You must be signed in to change notification settings

26B/laravel-dynamic-panels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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.

<livewire:dynamic-panels.container />

Customizing

Publish the configuration file should you need to customise it.

php artisan vendor:publish --tag=dynamic-panels-views

About

Provides an area on your website to display panels dynamically.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published