PHP code example of strataface / billstack-status-badge

1. Go to this page and download the library: Download strataface/billstack-status-badge 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/ */

    

strataface / billstack-status-badge example snippets


use Strataface\BillstackStatusBadge\Enums\PaymentStatus;

$status = PaymentStatus::tryFromMixed('PAID') ?? PaymentStatus::Draft;
$status->label();        // "Paid"
$status->badgeClasses(); // "bg-emerald-100 text-emerald-800 ring-emerald-200"
css
@source '../../vendor/strataface/billstack-status-badge/src/**/*.php';
@source '../../vendor/strataface/billstack-status-badge/resources/views/**/*.blade.php';
js
content: [
    // ...your existing paths
    './vendor/strataface/billstack-status-badge/src/**/*.php',
    './vendor/strataface/billstack-status-badge/resources/views/**/*.blade.php',
],