PHPackages                             naruepat/servicecurl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. naruepat/servicecurl

ActiveLibrary[HTTP &amp; Networking](/categories/http)

naruepat/servicecurl
====================

121PHP

Since Apr 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/naruepat/servicecurl)[ Packagist](https://packagist.org/packages/naruepat/servicecurl)[ RSS](/packages/naruepat-servicecurl/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

\#Laravel Service cURL

CURL for THiNKNET Web Service by Naruepat

\##Installation

Require this package in your `composer.json` and update composer. This will download the package

```
"naruepat/servicecurl": "dev-master"
```

or See

After updating composer, add the ServiceProvider to the providers array in `app/config/app.php`

```
'Naruepat\Servicecurl\ServicecurlServiceProvider',
```

You can use the facade for shorter code. Add this to your aliases:

```
'ServicecURL' => 'Naruepat\Servicecurl\Facades\Servicecurl',
```

The class is bound to the ioC as `ServicecURL`

```
$post = ServicecURL::post('www.example.com/list');
```

or if config domain you can use path

```
$post = ServicecURL::post('list');
```

Configuration
-------------

[](#configuration)

First, from the command line again, run

For Laravel 4

```
php artisan config:publish naruepat/servicecurl
```

For Laravel 5

```
php artisan view:publish
```

to publish the default configuration file.

Configuration was designed to be as flexible as possible.

By default, global configuration can be set in the `app/config/packages/naruepat/servicecurl/config.php` file. If a configuration isn't set, then the package defaults from `vendor/naruepat/servicecurl/src/config/config.php` are used. Here is an example configuration, with all the default settings shown:

```
return array(
	'domain' => 'http://www.example.com/',
	'client_id' => '',
	'client_secret' => ''
);
```

\##Usage

```

```

If you need to send headers or set cURL options you can manipulate a request object instead. `send()` finalizes the request and returns the result.

```
