PHP code example of abrardev / inspire-widget

1. Go to this page and download the library: Download abrardev/inspire-widget library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

abrardev / inspire-widget example snippets


use AbrarDev\InspireWidget\InspireWidgetPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            InspireWidgetPlugin::make()
        ])
}

use AbrarDev\InspireWidget\Widget\InspireWidget;

public function panel(Panel $panel): Panel
{
    return $panel
            ->widgets([
                Widgets\AccountWidget::class,
                Widgets\FilamentInfoWidget::class,
                InspireWidget::class,
            ])
}

use AbrarDev\InspireWidget\InspireWidgetPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            InspireWidgetPlugin::make()
                ->quotes([
                        'The only limit to our realization of tomorrow is our doubts of today.',
                        'The future belongs to those who believe in the beauty of their dreams.',
                        'Do not wait to strike till the iron is hot, but make it hot by striking.',
                    ])
        ])
}

use AbrarDev\InspireWidget\InspireWidgetPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            InspireWidgetPlugin::make()
                ->image(
                    new Image(asset('vendor/inspire-widget/images/patrick-carr-pAoo1Rs1Yy8-unsplash.jpg'),
                        __('Photo by :author on :service')
                    )
                )
        ])
}
bash
php artisan vendor:publish --tag="inspire-widget-views"