-
Notifications
You must be signed in to change notification settings - Fork 0
API
All API instances located in Milax\Mconsole\Core\API namespace and accessible by app('API') object.
app('API')->uploads
Attach uploaded files collection to given object
@return mixed
| type | name | description |
|---|---|---|
| string | group | Group name |
| Collection | images | Files collection |
| mixed | related | Related object |
| bool | unique | Should be unique |
Get files for given group, class and id
@return \Illuminate\Support\Collection
| type | name | description |
|---|---|---|
| string | group | Group name |
| string | class | Related class name |
| int | id | Related object id |
| string | url | Prefix URL |
Get image preview
-
@paramstring$dir[Directory OR filename] -
@paramstring$fileID[Optional filename if directory is set] -
@returnmixed
Handle images upload to tmp directory
-
@paramarray$config[Override uploader library config] -
@returnstring
Delete image by given id
-
@paramint$id[Image id] -
@returnvoid
Register callback handler
@return void
app('API')->info
Set App version
-
@paramstring$version[App version] -
@returnvoid
Get App version
-
@returnmixed
app('API')->menu
Get application menu tree
-
@parambool$flatten[True to flat array] -
@return\Illuminate\Support\Collection
app('API')->modules
Get list of modules
-
@paramstring$key[Get specific array key] -
@returnarray
Scan for new modules
-
@return\Milax\Mconsole\Core\API\Modules
Extend module
-
@paramMconsoleModule$module[Module object] -
@returnint
Install module package migrations, assets
-
@paramMconsoleModule$module[Module object] -
@return\Milax\Mconsole\Core\API\Modules
Uninstall module package
-
@paramMconsoleModule$module[ModuleObject] -
@return\Milax\Mconsole\Core\API\Modules
app('API')->notifications
Push notification
-
@paramstring$title[Notification title] -
@paramstring$text[Notification text] -
@paramstring$link[Link on click] -
@paramint$user[User id] -
@returnmixed
Mark notification as seen
-
@paramint$id[Message id] -
@returnmixed
Get unread notifications
-
@return\Illuminate\Support\Collection
app('API')->options
Get option value by its key
-
@paramstring$key -
@returnmixed
Create or update options
-
@paramarray$options[Options array] -
@returnvoid
Remove options from database
-
@paramarray$options[Options array] -
@returnvoid
app('API')->quickmenu
Register callback function
-
@paramClosure$callback -
@returnvoid
Get all quick menu items
-
@return\Illumiate\Support\Collection
app('API')->quotes
Get all quotes
-
@return\Illuminate\Support\Collection
Get random quote
-
@returnarray
Shuffle quotes, set random quote in $this->random
-
@returnvoid
Get random quote text
-
@returnstring
Get random quote author
-
@returnstring
app('API')->search
Register search engine callback
-
@paramClosure$callback -
@returnvoid
Handle search
-
@paramstring$text -
@return\Illuminate\Support\Collection
app('API')->translations
Load and merge translations
-
@returnvoid
Set Application locale for current user settings
-
@returnvoid