PHP code example of souravmsh / laravel-widget

1. Go to this page and download the library: Download souravmsh/laravel-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/ */

    

souravmsh / laravel-widget example snippets


return [
    'middleware' => ['web'], // Middleware for the route
    'url_prefix' => 'laravel-widget', // URL prefix for the route

    // Font Hunter
    'font_hunter' => [
        'dir'        => 'laravel-widget/font-hunter', // Base directory for storing files
        'fonts_dir'  => 'fonts', // Subdirectory for font files
        'css_dir'    => 'css', // Subdirectory for CSS files
        'file_name'  => 'fonts.css', // Name of the CSS file
    ],

    // Avatar Widget
    'avatar' => [
        'src'     => null,
        'alt'     => 'Avatar',
        'width'   => 48,
        'height'  => 48,
        'id'      => null,
        'classes' => null,
        'style'   => null,
        'attributes' => null,
    ]
];
bash
   php artisan vendor:publish --tag=config
   php artisan vendor:publish --tag=views
   
bash
   chmod -R 775 storage
   php artisan storage:link