for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Devpri\Tinre\Http\Resources\Api\V1;
use Illuminate\Http\Resources\Json\JsonResource;
class Url extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
return [
'id' => $this->id,
id
Devpri\Tinre\Http\Resources\Api\V1\Url
__get
'active' => $this->active,
active
'long_url' => $this->long_url,
long_url
'path' => $this->path,
path
'total_clicks' => $this->total_clicks,
total_clicks
'user_id' => $this->user_id,
user_id
'created_at' => $this->created_at,
created_at
'updated_at' => $this->updated_at,
updated_at
];
}