PHP code example of craftcms / laravel-aliases

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

    

craftcms / laravel-aliases example snippets


use CraftCms\Aliases\Aliases;

Aliases::set('@root', __DIR__);
Aliases::set('@vendor', '@root/vendor');
Aliases::set('@bin', '@vendor/bin');

echo Aliases::get('@bin/phpunit'); // /path/to/vendor/bin/phpunit