PHP code example of theplanworks / directus-laravel

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

    

theplanworks / directus-laravel example snippets


thePLAN\DirectusLaravel\DirectusLaravelServiceProvider::class,

public function __construct(DirectusLaravel $directusAPI)
{
    $this->api = $directusAPI;
}

$value = $this->api->getTableRows($table);

$value = $this->api->getTableRow($table, $id);

$value = $this->api->getTableRowBySlug($table, $slug)

$this->api->getFile($url);
bash
php artisan vendor:publish --provider="thePLAN\DirectusLaravel\DirectusLaravelServiceProvider"