You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
504 B
24 lines
504 B
<?php
|
|
|
|
namespace App\Http\Resources;
|
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
use Illuminate\Contracts\Support\Responsable;
|
|
|
|
class Successful implements Responsable
|
|
{
|
|
public static function make()
|
|
{
|
|
return new static;
|
|
}
|
|
|
|
public function toResponse($request)
|
|
{
|
|
return response()->json([
|
|
'data' => [
|
|
'code' => Response::HTTP_OK,
|
|
'message' => Response::$statusTexts[Response::HTTP_OK],
|
|
]
|
|
]);
|
|
}
|
|
}
|