PHP code example of terrazine / composer-events

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

    

terrazine / composer-events example snippets


\Illuminate\Support\Facades\Event::listen(\Terrazine\ComposerEvents\PreAutoloadDump::class, function () {
    return function (\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\output\OutputInterface $output){
        \Illuminate\Support\Facades\Artisan::call('down', [], $output);
    };
});

\Illuminate\Support\Facades\Event::listen(\Terrazine\ComposerEvents\PostAutoloadDump::class, function () {
    return function (\Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\output\OutputInterface $output){
        \Illuminate\Support\Facades\Artisan::call('up', [], $output);
    };
});