-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a18fcd1
commit 63b733a
Showing
4 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of the jiannei/laravel-response. | ||
* | ||
* (c) Jiannei <[email protected]> | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Jiannei\Response\Laravel\Contract; | ||
|
||
use Illuminate\Contracts\Pagination\Paginator; | ||
|
@@ -23,20 +32,17 @@ public function response(): JsonResponse; | |
*/ | ||
public function get(): ?array; | ||
|
||
|
||
/** | ||
* | ||
* Format data structures. | ||
* | ||
* @param mixed|null $data | ||
* @param string $message | ||
* @param int|\BackedEnum $code | ||
* @param $error | ||
* @param $error | ||
* @return $this | ||
*/ | ||
public function data(mixed $data = null, string $message = '', int|\BackedEnum $code = 200, $error = null): static; | ||
|
||
|
||
/** | ||
* Format paginator data. | ||
* | ||
|
@@ -60,4 +66,4 @@ public function resourceCollection(ResourceCollection $collection): array; | |
* @return array | ||
*/ | ||
public function jsonResource(JsonResource $resource): array; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters