for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Arcanedev\LaravelApiHelper\Traits;
use Illuminate\Support\Fluent;
/**
* Class TransformableModel
*
* @package Arcanedev\LaravelApiHelper\Traits
* @author ARCANEDEV <[email protected]>
*/
trait TransformableModel
{
/* -----------------------------------------------------------------
| Main Methods
| -----------------------------------------------------------------
* Transform the model.
* @param callable $callable
* @return \Illuminate\Support\Fluent
public function transform(callable $callable)
return new Fluent($callable($this));
}