23 lines
		
	
	
		
			420 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			420 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Transformers\Api\Application;
 | 
						|
 | 
						|
use App\Models\Egg;
 | 
						|
use App\Models\EggVariable;
 | 
						|
 | 
						|
class EggVariableTransformer extends BaseTransformer
 | 
						|
{
 | 
						|
    /**
 | 
						|
     * Return the resource name for the JSONAPI output.
 | 
						|
     */
 | 
						|
    public function getResourceName(): string
 | 
						|
    {
 | 
						|
        return Egg::RESOURCE_NAME;
 | 
						|
    }
 | 
						|
 | 
						|
    public function transform(EggVariable $model)
 | 
						|
    {
 | 
						|
        return $model->toArray();
 | 
						|
    }
 | 
						|
}
 |