{"id":36978592,"url":"https://github.com/theplanworks/directus-laravel","last_synced_at":"2026-01-13T22:48:06.572Z","repository":{"id":57068422,"uuid":"82125933","full_name":"theplanworks/directus-laravel","owner":"theplanworks","description":"A Laravel 5 Wrapper for the Directus REST API","archived":false,"fork":false,"pushed_at":"2017-03-02T02:23:11.000Z","size":21,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-30T08:51:52.943Z","etag":null,"topics":["directus","laravel","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theplanworks.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-16T01:38:28.000Z","updated_at":"2023-05-18T21:59:44.000Z","dependencies_parsed_at":"2022-08-24T14:54:11.309Z","dependency_job_id":null,"html_url":"https://github.com/theplanworks/directus-laravel","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/theplanworks/directus-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplanworks%2Fdirectus-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplanworks%2Fdirectus-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplanworks%2Fdirectus-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplanworks%2Fdirectus-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theplanworks","download_url":"https://codeload.github.com/theplanworks/directus-laravel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theplanworks%2Fdirectus-laravel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28403726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["directus","laravel","php"],"created_at":"2026-01-13T22:48:05.806Z","updated_at":"2026-01-13T22:48:06.565Z","avatar_url":"https://github.com/theplanworks.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://packagist.org/packages/theplanworks/directus-laravel\"\u003e\u003cimg src=\"https://poser.pugx.org/theplanworks/directus-laravel/v/stable.svg\" alt=\"Latest Stable Version\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/theplanworks/directus-laravel\"\u003e\u003cimg src=\"https://poser.pugx.org/theplanworks/directus-laravel/d/total.svg\" alt=\"Total Downloads\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://packagist.org/packages/theplanworks/directus-laravel\"\u003e\u003cimg src=\"https://poser.pugx.org/theplanworks/directus-laravel/license.svg\" alt=\"License\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# Directus API Wrapper for Laravel 5\n\nThis package allows users to easily consume the REST API provided by the [Directus](https://getdirectus.com) Headless CMS system in any Laravel app.\n\n## Installation\n\nInstall via [composer](https://getcomposer.org) using the command line:\n\n```bash\ncomposer require theplanworks/directus-laravel\n```\n\nIn Laravel 5, update the `config/app.php` providers array with the Service Provider:\n\n```php\nthePLAN\\DirectusLaravel\\DirectusLaravelServiceProvider::class,\n```\n\n### Configuration\n\nBy default, the package is set up to use the following configuration values read from your `.env` file:\n\n+ `DIRECTUS_CMS_URL` - The base URL of your CMS instance.\n+ `DIRECTUS_API_KEY` - The key generated by the CMS and associated with a valid user that authenticates requests\n\nIf you would like to use a config file, you can publish the default config by running the following command:\n\n```bash\nphp artisan vendor:publish --provider=\"thePLAN\\DirectusLaravel\\DirectusLaravelServiceProvider\"\n```\n\nThis will publish a config file to `config/directus-laravel.php`.\n\n## Usage\n\nTo utilize the API Wrapper, use dependency injection to resolve:\n\n```php\npublic function __construct(DirectusLaravel $directusAPI)\n{\n    $this-\u003eapi = $directusAPI;\n}\n```\n\nThen you can make the following calls:\n\n### getTableRows\n\n```php\n$value = $this-\u003eapi-\u003egetTableRows($table);\n```\n\nWhere `$table` is the name of the Directus table you would like to access.\n\n### getTableRow\n\n```php\n$value = $this-\u003eapi-\u003egetTableRow($table, $id);\n```\n\nWhere `$table` is the name of the Directus table you would like to access, and `$id` is the unique ID of the record being requested.\n\n### getTableRowBySlug\n\n```php\n$value = $this-\u003eapi-\u003egetTableRowBySlug($table, $slug)\n```\n\nWhere `$table` is the name of the Directus table you would like to access, and `$slug` is the unique slug property of the record being requested. PREREQUISITE: A `slug` field must have been created on the table.\n\n### getFile\n\n```php\n$this-\u003eapi-\u003egetFile($url);\n```\n\nWhere `$url` is the file url you would like to return, such as `/storage/uploads/00000000001.png`.\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheplanworks%2Fdirectus-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheplanworks%2Fdirectus-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheplanworks%2Fdirectus-laravel/lists"}