PHP code example of mariojgt / witchcraft

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

    

mariojgt / witchcraft example snippets


use Mariojgt\Witchcraft\Traits\HasWitchcraftTriggers;

class User extends Model
{
    use HasWitchcraftTriggers;

    // Your model code
}

use Mariojgt\Witchcraft\Services\WitchcraftTrigger;

// Execute a workflow
WitchcraftTrigger::execute(8, ['status' => 'active']);
bash
php artisan vendor:publish --provider="Mariojgt\Witchcraft\WitchcraftServiceProvider"
bash
php artisan vendor:publish --tag="witchcraft-config"