PHP code example of digitalion / laravel-makes

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

    

digitalion / laravel-makes example snippets


$options = DigitalionEnum::options();

// dump $options
[
	'key1'	=> 'value1',
	'key2'	=> 'value2',
	'key3'	=> 'value3',
]

$values = DigitalionEnum::values();

// dump $values
[
	'value1',
	'value2',
	'value3',
]

$keys = DigitalionEnum::keys();

// dump $keys
[
	'key1',
	'key2',
	'key3',
]

$valuesString = DigitalionEnum::valuesImplode();

// dump $valuesString
'value1,value2,value3'

$valuesRegex = DigitalionEnum::valuesRegex();

// dump $valuesRegex
'(value1|value2|value3)$'

return [
    'digitalion' => [
        'key1' => 'Value 1',
        'key2' => 'Value 2',
        'key3' => 'Value 3',
    ],
];

$trans = DigitalionEnum::trans('enums.digitalion');

// dump $trans
[
	'key1'	=> 'Value 1',
	'key2'	=> 'Value 2',
	'key3'	=> 'Value 3',
]
shell
php artisan make:class DigitalionClass
shell
php artisan make:enum DigitalionEnum
shell
php artisan make:helper DigitalionHelper
shell
php artisan make:scope DigitalionScope
shell
php artisan make:service DigitalionService
shell
php artisan make:trait DigitalionTrait