PHPackages                             aliirfaan/citronel-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. [API Development](/categories/api)
4. /
5. aliirfaan/citronel-core

ActiveLibrary[API Development](/categories/api)

aliirfaan/citronel-core
=======================

This package provides starter configuration and helper functions for laravel API projects.

2.3.11(3mo ago)0901MITPHPPHP &gt;=8.0.0

Since Nov 27Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/aliirfaan/citronel-core)[ Packagist](https://packagist.org/packages/aliirfaan/citronel-core)[ RSS](/packages/aliirfaan-citronel-core/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (8)Versions (29)Used By (1)

Citronel core
=============

[](#citronel-core)

Boilerplate to start laravel API project.

Features
--------

[](#features)

- Base configuration.
- Base controller.
- Helper service.
- Traits.

Requirements
------------

[](#requirements)

- [Composer](https://getcomposer.org/)
- [Laravel](http://laravel.com/)
- aliirfaan/laravel-simple-api

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

[](#installation)

- Install the package using composer:

```
 $ composer require aliirfaan/citronel-core
```

- Publish files with:

```
 $ php artisan vendor:publish --provider="aliirfaan\CitronelCore\CitronelCoreProvider"
```

or by using only `php artisan vendor:publish` and select the `aliirfaan\CitronelCore\CitronelCoreProvider` from the outputted list.

Configurations
--------------

[](#configurations)

- citronel Base configuration
- citronel-cahce Base cache configuration

Traits
------

[](#traits)

- CitronelApiControllerTrait
    Use this trait to send API responses with headers.
- CitronelCacheTrait
    Use this trait to cache responses.
- CitronelCorrelationTokenTrait
    Use this trait to work with correlation token.
- CitronelDateTimeTrait
    Use this trait to work with date time.
- CitronelMoneyTrait
    Use this trait to work money/amounts.
- resultFormatTrait
    Use this trait to get return format for function calls.

Controllers
-----------

[](#controllers)

- CitronelController
    Base controller.

Middleware
----------

[](#middleware)

- CitronelCorrelationToken
    Get correlation token in header based on a configurable header key.

Services
--------

[](#services)

- CitronelHelperService
    Base helper service.

Usage
-----

[](#usage)

- You can use traits in your custom helper service and then use your custom helper service in your controllers

```
