Lint PHP code psr-12, add GH action
This commit is contained in:
@@ -9,19 +9,21 @@ use Illuminate\Routing\Controller as BaseController;
|
||||
|
||||
class Controller extends BaseController
|
||||
{
|
||||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;
|
||||
use AuthorizesRequests;
|
||||
use DispatchesJobs;
|
||||
use ValidatesRequests;
|
||||
|
||||
public function success($data = [])
|
||||
{
|
||||
return response()->json(array_merge([
|
||||
'type' => 'success'
|
||||
'type' => 'success',
|
||||
], $data));
|
||||
}
|
||||
|
||||
public function error($data = [], $statusCode = 400)
|
||||
{
|
||||
return response()->json(array_merge([
|
||||
'type' => 'error'
|
||||
'type' => 'error',
|
||||
], $data), $statusCode);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user