PHP code example of lopatin96 / lara-enum

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

    

lopatin96 / lara-enum example snippets


php artisan vendor:publish --tag="lara-enum-config"

php artisan vendor:publish --tag="lara-enum-lang"

return [

    'document-status' => [
        'color' => [
            'pending' => 'amber',
            'in_progress' => 'blue',
            'in_progress_pending' => 'blue',
            'finished' => 'green',
            'error' => 'red',
        ],
    ],

];

return [

    'document-status' => [
        'label' => [
            'pending' => 'Pending',
            'in_progress' => 'In progress',
            'in_progress_pending' => 'In progress',
            'finished' => 'Finished',
            'error' => 'Error',
        ],
    ],

];