PHP code example of aedart / laravel-detector

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

    

aedart / laravel-detector example snippets



use Aedart\Laravel\Detector\Traits\ApplicationDetectorTrait;

class MyHandler
{
    use ApplicationDetectorTrait;

    public function doSomething()
    {
        if($this->isApplicationAvailable()){
            // ... Laravel specific logic - not shown here ... //
        
            return true;
        }
        
        // ... Non-Laravel specific logic - not shown here ... //
        
        return false;
    }
}