PHPackages                             ademes/core - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ademes/core

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ademes/core
===========

1.0.0(10y ago)02593MITPHPPHP &gt;=5.4.0

Since Aug 1Pushed 9y ago2 watchersCompare

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

READMEChangelogDependencies (3)Versions (4)Used By (0)

Ademes Core modules
===================

[](#ademes-core-modules)

Should include all core modules and functions for different applications

Installation
------------

[](#installation)

Add the following line to the `require` section of `composer.json`:

```
{
    "require": {
        "ademes/core": "dev-master"
    }
}
```

Setup
-----

[](#setup)

1. Add `'Ademes\Core\CoreServiceProvider',` to the service provider list in `app/config/app.php`.

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

[](#configuration)

In order to use the Api Proxy publish its configuration first

```
php artisan config:publish ademes/core

```

Afterwards edit the file `app/config/packages/ademes/core/core.php` to suit your needs.

Usage
-----

[](#usage)

### Authentication

[](#authentication)

```
$authResponse = $app['authClient']->authenticate('admin@admin.com', '000000', 'IhzopIc5SuMf3oUT', 'GUXaqBpeFgN1GKYNTOvh4nOnRpEig4J1');
if ($authResponse) {
    Session::set('AuthToken', $authResponse);
} else {
    throw new Exception('You\'re not authenticated');
}

```

### Fetch User info

[](#fetch-user-info)

1. Get logged in user

```
$user = $app['userClient']->getLoggedInUser($authResponse->getAccessToken());
if ($user) {
    Session::put('data.user', $user);
}

```

### Http Client

[](#http-client)

Use this class for all request to api services.

Client has 3 methods:

1. GET
2. POST
3. DELETE Due to limitation of Laravel 4, to be able to make PUT, PATCH request, we have to sende '\_method'=&gt;'PUT'/'PATCH' in message body.

#### Request Examples

[](#request-examples)

1. GET

```
$query = $this->http->get($_ENV['API_VERSION'].'/companies', [
    'query' => [
        'access_token' => Session::get('AuthToken')->getAccessToken()
    ]
]);

```

2. POST

```
$data = [
    'headers' => ['Content-Type' => 'application/x-www-form-urlencoded'],
    'body' => [
        'name' => Input::get('name'),
        'description' => Input::get('description'),
        'url' => Input::get('url'),
        'photo' => fopen($path, 'r'),
        'access_token' => Session::get('AuthToken')->getAccessToken()
    ]
];
$response = $this->http->post($_ENV['API_VERSION'] . '/companies', $data);

```

3. DELETE

```
$body = ['access_token'=>Session::get('AuthToken')->getAccessToken()];
$response = $this->http->delete($_ENV['API_VERSION'] . '/companies/' . $id, ['body'=>$body]);

```

4. PUT

```
$data = [
    'headers' => ['Content-Type' => 'application/x-www-form-urlencoded'],
    'body' => [
        '_method' => 'PUT',
        'name' => Input::get('name'),
        'description' => Input::get('description'),
        'url' => Input::get('url'),
        'access_token' => Session::get('AuthToken')->getAccessToken()
    ]
];
$response = $this->http->post($_ENV['API_VERSION'] . '/companies/'.$id, $data);

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3938d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f34911907dc1a9aa5445f99d65ac9d3aa2d7b2baf8214631b884e95659b96e4?d=identicon)[lhj1982](/maintainers/lhj1982)

---

Top Contributors

[![lhj1982](https://avatars.githubusercontent.com/u/1662699?v=4)](https://github.com/lhj1982 "lhj1982 (23 commits)")

### Embed Badge

![Health badge](/badges/ademes-core/health.svg)

```
[![Health](https://phpackages.com/badges/ademes-core/health.svg)](https://phpackages.com/packages/ademes-core)
```

###  Alternatives

[stevebauman/location

Retrieve a user's location by their IP Address

1.3k7.6M65](/packages/stevebauman-location)[nativephp/mobile

NativePHP for Mobile

82724.0k43](/packages/nativephp-mobile)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[pulkitjalan/ip-geolocation

IP Geolocation Wrapper with Laravel Support

89164.9k1](/packages/pulkitjalan-ip-geolocation)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
