DashboardAdminController
extends ApiController
in package
Table of Contents
Properties
- $accessRepository : AdminAccessRepositoryInterface
- $metadata : array<string|int, mixed>
- $metamessage : string|null
- $statRepository : StatsContentRepositoryInterface
Methods
- __construct() : mixed
- activeAdmin() : JsonResource
- addMetadata() : mixed
- adminLogged() : JsonResource
- alert() : mixed
- chartData() : JsonResponse
- deepStatistic() : JsonResponse
- error() : JsonResponse
- Error Response.
- getUser() : User
- info() : JsonResponse
- Info Response.
- itemStatistic() : JsonResponse
- keepCacheSuccess() : JsonResponse
- Tell client keep its cache and does not response data.
- message() : mixed
- metafoxNews() : JsonResponse
- navigate() : mixed
- siteStatus() : JsonResponse
- statType() : JsonResponse
- success() : JsonResponse
- Success Response.
- warning() : JsonResponse
- Warning Response.
- processReturn() : JsonResponse
Properties
$accessRepository
private
AdminAccessRepositoryInterface
$accessRepository
$metadata
private
array<string|int, mixed>
$metadata
= []
$metamessage
private
string|null
$metamessage
= null
$statRepository
private
StatsContentRepositoryInterface
$statRepository
Methods
__construct()
public
__construct(AdminAccessRepositoryInterface $accessRepository, StatsContentRepositoryInterface $statRepository) : mixed
Parameters
- $accessRepository : AdminAccessRepositoryInterface
- $statRepository : StatsContentRepositoryInterface
activeAdmin()
public
activeAdmin() : JsonResource
Tags
Return values
JsonResourceaddMetadata()
public
addMetadata([array<string|int, mixed>|null $meta = [] ]) : mixed
Parameters
- $meta : array<string|int, mixed>|null = []
adminLogged()
public
adminLogged() : JsonResource
Return values
JsonResourcealert()
public
alert(mixed $alert) : mixed
Parameters
- $alert : mixed
chartData()
public
chartData(ChartDataRequest $request) : JsonResponse
Parameters
- $request : ChartDataRequest
Return values
JsonResponsedeepStatistic()
public
deepStatistic() : JsonResponse
Return values
JsonResponseerror()
Error Response.
public
error([string $error = '' ][, int $code = 400 ][, array<string|int, mixed> $headers = [] ][, int $options = 0 ]) : JsonResponse
Parameters
- $error : string = ''
- $code : int = 400
- $headers : array<string|int, mixed> = []
- $options : int = 0
Return values
JsonResponsegetUser()
public
getUser() : User
Return values
Userinfo()
Info Response.
public
info([object|array<string|int, mixed>|null $data = [] ][, array<string, mixed> $extra = [] ][, array<string|int, mixed>|string|null $message = null ][, int $code = 200 ][, array<string, mixed> $headers = [] ][, int $options = 0 ]) : JsonResponse
Parameters
- $data : object|array<string|int, mixed>|null = []
- $extra : array<string, mixed> = []
- $message : array<string|int, mixed>|string|null = null
- $code : int = 200
- $headers : array<string, mixed> = []
- $options : int = 0
Return values
JsonResponseitemStatistic()
public
itemStatistic() : JsonResponse
Return values
JsonResponsekeepCacheSuccess()
Tell client keep its cache and does not response data.
public
keepCacheSuccess([array<string|int, mixed> $data = [] ]) : JsonResponse
Parameters
- $data : array<string|int, mixed> = []
Return values
JsonResponsemessage()
public
message(mixed $message) : mixed
Parameters
- $message : mixed
metafoxNews()
public
metafoxNews() : JsonResponse
Return values
JsonResponsenavigate()
public
navigate(string $url[, bool $replace = false ]) : mixed
Parameters
- $url : string
- $replace : bool = false
siteStatus()
public
siteStatus(Request $request) : JsonResponse
Parameters
- $request : Request
Return values
JsonResponsestatType()
public
statType() : JsonResponse
Return values
JsonResponsesuccess()
Success Response.
public
success([object|array<string|int, mixed>|null $data = [] ][, array<string, mixed> $meta = [] ][, array<string|int, mixed>|string|null $message = null ][, int $code = 200 ][, array<string, mixed> $headers = [] ][, int $options = 0 ]) : JsonResponse
Parameters
- $data : object|array<string|int, mixed>|null = []
- $meta : array<string, mixed> = []
- $message : array<string|int, mixed>|string|null = null
- $code : int = 200
- $headers : array<string, mixed> = []
- $options : int = 0
Return values
JsonResponsewarning()
Warning Response.
public
warning([object|array<string|int, mixed>|null $data = [] ][, array<string, mixed> $extra = [] ][, array<string|int, mixed>|string|null $message = null ][, int $code = 200 ][, array<string, mixed> $headers = [] ][, int $options = 0 ]) : JsonResponse
Parameters
- $data : object|array<string|int, mixed>|null = []
- $extra : array<string, mixed> = []
- $message : array<string|int, mixed>|string|null = null
- $code : int = 200
- $headers : array<string, mixed> = []
- $options : int = 0
Return values
JsonResponseprocessReturn()
private
processReturn(string $status, mixed|object $data[, array<string|int, mixed>|string|null $message = null ][, string|null $error = null ][, int $code = 200 ][, array<string|int, mixed> $headers = [] ][, int $options = JSON_PRETTY_PRINT ][, array<string|int, mixed> $meta = [] ]) : JsonResponse
Parameters
- $status : string
- $data : mixed|object
- $message : array<string|int, mixed>|string|null = null
- $error : string|null = null
- $code : int = 200
- $headers : array<string|int, mixed> = []
- $options : int = JSON_PRETTY_PRINT
- $meta : array<string|int, mixed> = []