PHP code example of aurorawebsoftware / aissue

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

    

aurorawebsoftware / aissue example snippets


use AuroraWebSoftware\AIssue\Models\AIssue;

$issue = AIssue::create([
    'summary' => 'Example issue',
    'description' => 'Detailed description of the issue',
]);

// Apply a predefined workflow
$issue->applyWorkflow('simple');


// Assuming $user1 and $user2 are instances of a Model that implements IssueActorModelContract
$issue->setReporter($user1); // Set the reporter
$issue->setResponsible($user2); // Set the responsible party


// Transition to another state
$issue->transitionTo('state2');

// Check current state
$currentState = $issue->currentState();


// Add observers to an issue
$issue->addObserver($user3);
$issue->addObserver($user4);

// Remove an observer
$issue->removeObserver($user3);

// Remove all observers
$issue->removeAllObservers();


use Illuminate\Support\Carbon;

// Set a due date for the issue
$issue->setDueDate(Carbon::today());

// Remove the due date
$issue->removeDueDate();

bash
php artisan vendor:publish --provider="AuroraWebSoftware\AIssue\AIssueServiceProvider" --tag="migrations"
php artisan migrate