prusmarcin / laravel-rest-client
Package Rest Full Client for Laravel 5.6
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Language:HTML
Requires
- guzzlehttp/guzzle: ^6.3
- laravel/framework: ^5.6
This package is not auto-updated.
Last update: 2025-05-01 13:29:14 UTC
README
Package Rest Full API client for Laravel
You can see package Server API package laravel-rest-server for use on a separate Laravel installation
Installation
To install this package you will need:
Laravel 5 (see compatibility table)
PHP 7.0 +
Install via composer - edit your composer.json
to require the package.
{ "require": { "prusmarcin/laravel-rest-client": "dev-master" } }
Then run composer update
in your terminal to pull it in.
Or via the command line in the root of your application installation.
$ composer require prusmarcin/laravel-rest-client
Once this has finished, you will need to add the service provider to the providers
array in your app.php
config as follows:
\Restclient\RestclientServiceProvider::class,
Then execute this command
$ php artisan vendor:publish
Select provider from lists Provider: Restclient\RestclientServiceProvider
and confirm.
Then enter the config
directory in your Laravel installation and open the restclient.php
file.
Edit url value where your Rest Full API server is located.
return [ /* |-------------------------------------------------------------------------- | URL Rest Server API |-------------------------------------------------------------------------- */ 'url' => 'http://127.0.0.1:8000/api/' ];
And you're done!
Usage
Run this url in browser http://localhost/laravelzadanie/test/public/products
WHERE http://localhost/laravelzadanie/test/public/
<- is source your installation Laravel
If everything works, you'll see what's on the screenshot
To view all products just enter http://localhost/laravelzadanie/test/public/products/available
You'll see
Author
License
The MIT License (MIT). Please see License File for more information.