PHP code example of shabushabu / laravel-version

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

    

shabushabu / laravel-version example snippets


use function ShabuShabu\Version\version;

version()->date(); // CarbonInterface::class
version()->tag(); // eg: v0.18.0
version()->hash(); // eg: 9127c86
version()->short(); // eg: v0.18.0-9127c86
version()->long(format: 'Y-m-d'); // eg: v0.18.0-9127c86 (2023-09-21)
bash
php artisan vendor:publish --tag="version-config"
bash
php artisan cache:forget app:version