PHP code example of exxxar / kanban-laravel
1. Go to this page and download the library: Download exxxar/kanban-laravel 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/ */
exxxar / kanban-laravel example snippets
use Kanban;
$response = Kanban::tasks()->create([
'thread' => 1,
'type' => 'order',
'payload' => [
'title' => 'Новая задача',
'description' => 'Описание задачи'
]
]);
$comments = Kanban::tasks()->comments(55);
Kanban::tasks()->addComment(55, [
'author' => 'Алексей',
'text' => 'Готово!',
]);
Kanban::tasks()->uploadAttachments(55, [
storage_path('app/test.jpg'),
storage_path('app/manual.pdf'),
]);
$board = Kanban::boards()->get('123e4567-e89b-12d3-a456-426614174000');
$list = Kanban::boards()->list();
Kanban::boards()->applyTemplate(
'123e4567-e89b-12d3-a456-426614174000',
'classic'
);
$comments = Kanban::comments()->list(55);
Kanban::comments()->add(55, [
'author' => 'Алексей',
'text' => 'Комментарий через SDK',
]);
$attachments = Kanban::attachments()->list(55);
Kanban::attachments()->upload(55, [
'/path/to/file1.jpg',
'/path/to/file2.pdf',
]);
use Alexey\Kanban\Services\KanbanClient;
public function handle(KanbanClient $kanban)
{
$task = $kanban->tasks()->create([...]);
}
use Kanban;
// Создать задачу
Kanban::tasks()->create([
'thread' => 1,
'type' => 'order',
'payload' => ['title' => 'Новая задача']
]);
// Получить доску
$board = Kanban::boards()->get('123');
// Добавить комментарий
Kanban::comments()->add(55, [
'author' => 'Алексей',
'text' => 'Готово!',
]);
// Загрузить вложения
Kanban::attachments()->upload(55, [
'/path/to/file1.jpg',
'/path/to/file2.pdf',
]);
bash
php artisan vendor:publish --tag=config
kanban-laravel/
├── src/
│ ├── KanbanServiceProvider.php
│ ├── Facades/
│ │ └── Kanban.php
│ ├── Services/
│ │ ├── KanbanClient.php
│ │ ├── Boards.php
│ │ ├── Tasks.php
│ │ ├── Comments.php
│ │ └── Attachments.php
├── config/
│ └── kanban.php
├── composer.json
├── README.md
└── tests/