PHP code example of oligus / jad
1. Go to this page and download the library: Download oligus/jad library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
oligus / jad example snippets
/**
* @ORM\Entity
* @ORM\Table(name="albums")
* @Jad\Map\Annotations\Header(type="albums")
*/
class Albums
{
...
$jad = new Jad(new Jad\Map\AnnotationMapper($em));
$jad->setPathPrefix('/api/v1/jad');
$jad->jsonApiResult();
// Jad middleware
$app->middleware([
'jad' => Jad\Support\Lumen\JadMiddleWare::class,
]);
...
// Register Service Providers
$app->register(Jad\Support\Lumen\JadServiceProvider::class);