28 lines
667 B
PHP
28 lines
667 B
PHP
<?php
|
|
|
|
namespace App\Http\Resources\dashboard;
|
|
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Http\Resources\Json\JsonResource;
|
|
use Illuminate\Support\Facades\Config;
|
|
|
|
class DeveloperResource extends JsonResource
|
|
{
|
|
/**
|
|
* Transform the resource into an array.
|
|
*
|
|
* @return array<string, mixed>
|
|
*/
|
|
public function toArray(Request $request): array
|
|
{
|
|
$app_base_url = Config::get('appSetting.app_base_url');
|
|
|
|
return [
|
|
'id' => $this->id,
|
|
'name' => $this->name,
|
|
'description' => $this->description,
|
|
'image' => $this->image ? $app_base_url . $this->image : null,
|
|
];
|
|
}
|
|
}
|