PHP code example of aedart / athenaeum-redmine

1. Go to this page and download the library: Download aedart/athenaeum-redmine 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 / athenaeum-redmine example snippets


use Aedart\Redmine\Issue;
use Aedart\Redmine\Project;
use Aedart\Redmine\IssueCategory;
use Aedart\Contracts\Http\Clients\Requests\Builder;

// Create resources
$project = Project::create([
    'name' => 'Deus Ex',
    'identifier' => 'deus-ex'
]);

// Fetch list of resources, apply filters to http request...
$issues = Issue::fetchMultiple(function(Builder $request) {
    return $request->where('assigned_to_id', 'me');
});

// Change existing resources
$category = IssueCategory::findOrFail(1344);
$category->update([
    'name' => 'Business Goals'
]);

// ...or remove them
Issue::findOrFail(9874)
    ->delete();

\Aedart\Contracts\Redmine\Exceptions\UnsupportedOperationException