# Vendor files load

**URL:** <https://discourse.cakephp.org/t/vendor-files-load/1646>\
**Category:** Need Help\
**Created:** [November 30, 2016, 9:55pm UTC](https://discourse.cakephp.org/t/vendor-files-load/1646 "2016-11-30T21:55:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![testteamwant](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@testteamwant](https://discourse.cakephp.org/u/testteamwant)\
**Post date:** [November 30, 2016, 9:55pm UTC](https://discourse.cakephp.org/t/vendor-files-load/1646/1 "2016-11-30T21:55:05Z")

</div>

I have problem with Paylane rest client and Cakephp 3. Via console and composer I download Paylane rest client:

> **[paylane/client - Packagist](https://packagist.org/packages/paylane/client)**
>
> PayLane REST Client for PHP

`composer require paylane/client`  
Ok, now I try to call this class.

```
require_once(ROOT .DS. 'vendor' . DS . 'paylane' . DS . 'client' . DS . 'paylane' . DS . 'PayLaneRestClient.php');
$client = new PayLaneRestClient('aaaaa', 'aaaaaa');

```

But I still have error:

> Call to undefined function Controller\PayLaneRestClient()

How I can resolve this ?

---

<div class="post-metadata">

**Author:** ![rrd](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/rrd/32/113_2.png) [@rrd](https://discourse.cakephp.org/u/rrd)\
**Post date:** [December 1, 2016, 11:03am UTC](https://discourse.cakephp.org/t/vendor-files-load/1646/2 "2016-12-01T11:03:50Z")

</div>

You do not have to use `require` as all vendor files are autoloaded.

Instead of this you should call `use PayLaneRestClient;` at the begginning of your controller (where the other use calls are).
