Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 13 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-03-13T08:55:39.000Z (almost 3 years ago)
- Last Synced: 2024-12-08T08:10:41.140Z (2 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.![Travis (.org)](https://img.shields.io/travis/teakowa/laravel-cloudflare?style=flat-square)
[![StyleCI](https://github.styleci.io/repos/199674005/shield?branch=master)](https://github.styleci.io/repos/199674005)
![PHP from Packagist](https://img.shields.io/packagist/php-v/teakowa/laravel-cloudflare?style=flat-square)
![Packagist Version](https://img.shields.io/packagist/v/teakowa/laravel-cloudflare?style=flat-square)
[![LICENSE](https://img.shields.io/badge/License-Anti%20996-blue.svg?style=flat-square)](https://github.com/996icu/996.ICU/blob/master/LICENSE)
[![LICENSE](https://img.shields.io/badge/License-Apache--2.0-green.svg?style=flat-square)](https://github.com/996icu/996.ICU/blob/master/LICENSE)
[![996.icu](https://img.shields.io/badge/Link-996.icu-red.svg?style=flat-square)](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)]().