laravel-api / laravel-api
This is my package laravel-api
Requires
- php: ^8.0.2
- guzzlehttp/guzzle: ^7.4
- illuminate/contracts: ^9.24
Requires (Dev)
- nunomaduro/collision: ^6.2
- orchestra/testbench: ^7.6
- pestphp/pest: ^1.21
- pestphp/pest-plugin-laravel: ^1.2
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2024-05-04 08:07:32 UTC
README
The easiest way to embed APIs in a Laravel project.
Installation
You can install the package via composer:
composer require laravel-api/laravel-api
Usage
php artisan api:install twitter
Please provide the credentials when asked for, they will automatically be placed in your .env
file.
To check if the credentials are correct, run the test command:
php artisan api:test twitter
Now you can the use the api client like:
Twitter::tweet('Draußen scheint die Sonne');
Fakes
Twitter::fake(); Twitter::tweet('sdfdsfdsf'); Twitter::assertTweeted('fdsfdsf')
Advantages
- you dont have to search for API packages
- automatic setup (service provider, config, etc.)
- consistent commands for install, testing, etc.
Dear API Developers
If you want your client to be included in Laravel APIs, or add your own client wrapper, check here....
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.