Merge remote-tracking branch 'origin/master' into mhmfajar

This commit is contained in:
Muhammad Fajar
2022-11-03 09:56:48 +07:00
1193 changed files with 45 additions and 5 deletions

0
Modules/Linksehat/Config/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Config/config.php Normal file → Executable file
View File

0
Modules/Linksehat/Console/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Database/Migrations/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Database/Seeders/.gitkeep Normal file → Executable file
View File

View File

0
Modules/Linksehat/Database/factories/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Entities/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Http/Controllers/.gitkeep Normal file → Executable file
View File

View File

View File

View File

View File

@@ -61,10 +61,7 @@ class DoctorController extends Controller
$doctors = $doctors->paginate($limit);
return response()->json([
'message' => 'Sukses mengambil data Dokter',
'doctors' => Helper::paginateResources(PractitionerRoleToDoctorResource::collection($doctors))
]);
return Helper::makeJsonResponse(Helper::paginateResources(PractitionerRoleToDoctorResource::collection($doctors)));
}
/**

View File

View File

View File

View File

View File

0
Modules/Linksehat/Http/Middleware/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Http/Requests/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Http/Requests/PersonRequest.php Normal file → Executable file
View File

0
Modules/Linksehat/Providers/.gitkeep Normal file → Executable file
View File

View File

0
Modules/Linksehat/Providers/RouteServiceProvider.php Normal file → Executable file
View File

0
Modules/Linksehat/Resources/assets/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Resources/assets/js/app.js Normal file → Executable file
View File

0
Modules/Linksehat/Resources/assets/sass/app.scss Normal file → Executable file
View File

0
Modules/Linksehat/Resources/lang/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Resources/views/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Resources/views/index.blade.php Normal file → Executable file
View File

View File

0
Modules/Linksehat/Routes/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Routes/api.php Normal file → Executable file
View File

0
Modules/Linksehat/Routes/web.php Normal file → Executable file
View File

0
Modules/Linksehat/Tests/Feature/.gitkeep Normal file → Executable file
View File

0
Modules/Linksehat/Tests/Unit/.gitkeep Normal file → Executable file
View File

View File

View File

View File

0
Modules/Linksehat/Transformers/DoctorResource.php Normal file → Executable file
View File

View File

View File

View File

@@ -0,0 +1,38 @@
<?php
namespace Modules\Linksehat\Transformers;
use Illuminate\Http\Resources\Json\JsonResource;
class HospitalResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request
* @return array
*/
public function toArray($request)
{
return [
'id' => $this->id,
'name' => $this->name,
'code' => $this->code,
'description' => $this->description,
'address' => $this->currentAddress->text ?? null,
'lat' => $this->currentAddress->lat ?? null,
'lng' => $this->currentAddress->lng ?? null,
'distance' => isset($this->distance_km) ? round($this->distance_km) . ' km' : null,
'city_name' => $this->currentAddress->city->name ?? null,
'rating' => rand(350, 500) / 100,
'phone' => $this->meta->phone,
'photo_url' => asset('images/default-hospital-image.png'),
'photos' => [
[
'title' => $this->name,
'photo_url' => asset('images/default-hospital-image.png'),
]
]
];
}
}

View File

View File

View File

0
Modules/Linksehat/Transformers/UserProfileResource.php Normal file → Executable file
View File

0
Modules/Linksehat/composer.json Normal file → Executable file
View File

0
Modules/Linksehat/module.json Normal file → Executable file
View File

0
Modules/Linksehat/package.json Normal file → Executable file
View File

0
Modules/Linksehat/webpack.mix.js Normal file → Executable file
View File