34 lines
776 B
PHP
34 lines
776 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
|
|
class TermsAndPrivacyResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return array
|
|
*/
|
|
public function toArray($request)
|
|
{
|
|
$this->withoutWrapping();
|
|
|
|
return [
|
|
'tp_uuid' => $this->tp_uuid,
|
|
'title' => $this->title,
|
|
// 'details' => $this->concatDetails($this->details),
|
|
'details' => $this->details,
|
|
'type' => $this->type,
|
|
];
|
|
}
|
|
|
|
// function concatDetails($details)
|
|
// {
|
|
// return strlen($details) < 100 ? $details : substr($details, 0, 100)."...";
|
|
// }
|
|
|
|
}
|