1. Go to this page and download the library: Download daikazu/laratone 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/ */
daikazu / laratone example snippets
return [
// Table prefix for Laratone tables
'table_prefix' => 'laratone_',
// Cache duration in seconds for color books and colors
'cache_time' => 3600,
];
use Daikazu\Laratone\Laratone;
// Get all color books
$colorBooks = Laratone::colorBooks();
// Get a specific color book
$colorBook = Laratone::colorBookBySlug('color-book-plus-solid-coated');
// Create a new color book
$newColorBook = Laratone::createColorBook('My New Color Book');
// Add colors to a color book
$color = Laratone::addColorToBook($colorBook, [
'name' => 'New Color',
'hex' => 'FF0000',
'rgb' => '255,0,0'
]);
// Update a color
Laratone::updateColor($color, ['name' => 'Updated Color Name']);
// Delete a color
Laratone::deleteColor($color);