https://github.com/teakowa/laravel-cloudflare
The Cloudflare API right from Laravel.
https://github.com/teakowa/laravel-cloudflare
cloudflare cloudflare-api laravel-cloudflare packagist
Last synced: 4 months ago
JSON representation
The Cloudflare API right from Laravel.
- Host: GitHub
- URL: https://github.com/teakowa/laravel-cloudflare
- Owner: Teakowa
- License: other
- Created: 2019-07-30T15:00:25.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-13T08:55:39.000Z (about 4 years ago)
- Last Synced: 2025-08-05T01:49:19.774Z (10 months ago)
- Topics: cloudflare, cloudflare-api, laravel-cloudflare, packagist
- Language: PHP
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE-ANTI996
Awesome Lists containing this project
README
# Laravel Cloudflare
The Cloudflare API right from Laravel.

[](https://github.styleci.io/repos/199674005)


[](https://github.com/996icu/996.ICU/blob/master/LICENSE)
[](https://github.com/996icu/996.ICU/blob/master/LICENSE)
[](https://996.icu)
*Note: This will work for anything Laravel 5 and up but I made it for Laravel 5.5 so I won't add the service provider and facade instructions here.*
## Installation
First of all, You need get your API key **(not token)** from [Cloudflare](https://dash.cloudflare.com/profile/api-tokens)
```sh
composer require Teakowa/laravel-cloudflare
```
Publish the config file.
```
php artisan vendor:publish
```
Put them in your `.env` as the following, obviously and respectively.
1. `CLOUDFLARE_EMAIL`
2. `CLOUDFLARE_API_KEY`
## Usage
Lastly, you can using `Cloudflare` class in controller use namespace top of that file
```php
use Teakowa\Cloudflare\Cloudflare;
$data = (new Cloudflare)->zone()->listZones();
```
or if you want a simple, you can use `cloudflare` function:
```php
cloudflare()
```
## LICENSE
The code in this repository, unless otherwise noted, is under the terms of both the [Anti 996](https://github.com/996icu/996.ICU/blob/master/LICENSE) License and the [Apache License (Version 2.0)]().