mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
0606973035
* Fix for CORs error where file download were being prevented by headers * Fixes for CORs and File downloads * give contextual error messages for invalid route actions * Clean up LoginController for OAuth Testing * Quote Actions * Invoice and Quote Actions * Fixes for Token Name * Change test data seeder to create separate small,medium,large companies
52 lines
920 B
PHP
52 lines
920 B
PHP
<?php
|
|
/**
|
|
* Invoice Ninja (https://invoiceninja.com)
|
|
*
|
|
* @link https://github.com/invoiceninja/invoiceninja source repository
|
|
*
|
|
* @copyright Copyright (c) 2019. Invoice Ninja LLC (https://invoiceninja.com)
|
|
*
|
|
* @license https://opensource.org/licenses/AAL
|
|
*/
|
|
|
|
namespace App\Transformers;
|
|
|
|
use App\Models\CompanyToken;
|
|
use App\Utils\Traits\MakesHash;
|
|
|
|
/**
|
|
* Class CompanyTokenTransformer.
|
|
*/
|
|
class CompanyTokenTransformer extends EntityTransformer
|
|
{
|
|
use MakesHash;
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $defaultIncludes = [
|
|
];
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
protected $availableIncludes = [
|
|
];
|
|
|
|
|
|
/**
|
|
* @param CompanyToken $company_token
|
|
*
|
|
* @return array
|
|
*/
|
|
public function transform(CompanyToken $company_token)
|
|
{
|
|
return [
|
|
'token' => $company_token->token,
|
|
'name' => $company_token->name ?: '',
|
|
];
|
|
}
|
|
|
|
|
|
}
|