PHP code example of kylewlawrence / infinity-laravel
1. Go to this page and download the library: Download kylewlawrence/infinity-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/ */
// Get all Servers
Infinity::boards()->getAll();
// Create a new board
$newBoard = Infinity::boards()->create([
'name' => 'Blah Blah',
'description' => 'Bler bleman blope',
'user_ids' => [1234, 1235, 12346],
]);
print_r($newBoard);
// Delete an item
Infinity::boards('PWefUeHA8Pd')->items('8b9fee67-600c-499f-ab19-04bd9092be4e')->delete();
use KyleWLawrence\Infinity\Services\InfinityService;
class MyClass {
public function __construct(InfinityService $infinity_service) {
$this->infinity_service = $infinity_service;
}
public function getBoards() {
$this->infinity_service->boards()->getAll();
}
}