PHP code example of vertaalbureau-perfect / action-pattern
1. Go to this page and download the library: Download vertaalbureau-perfect/action-pattern 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/ */
vertaalbureau-perfect / action-pattern example snippets
class CreateLogAction extends AbstractAction
{
public function handle($message)
{
Log::debug($message);
}
}
CreateLogAction::execute('Write me to the log please!');
CreateLogAction::fake();
CreateLogAction::fake('Log Success');
bash
php artisan make:action [ActionName]
bash
php artisan make:action [SubNamespace]/[ActionName]