Function for develop
Introduce
Functions for developers of modules, views, fields... on goeasyapp
__routeUrl("/{{slug_page}}")
Get page url
For both website and android ios app
__getlanguage()
Get the language the website is using (en, vi..)
__trans($language, $key)
Translate languages available on the system
$language
always fixed
$key
is the keyword you want to translate
getParams($params)
Returns the request sent
__getIdComposer($param)
When creating a data field in composer. If you choose type = composer it will return the id of the composer
__getError($errors)
Returns error messages from the system used when logging in....
__getPrice($price, $number = 2)
Create the style of the number
__getCurency()
Return curency
isMobile()
Check mobile type
Variable $help
Use to get data and check user login status
$help
is an instance of HelpRepository
, used to interact with database tables.
$help->checkAuth()
Return status login
$help->getUser()
Returns information about the currently logged in user
$help->getFavorite()
Returns list of favorite products
$help->getCart()
Returns list of cart products
$help->table($composer)
Database connection support
Use: where, whereIn, whereOr, limit, offset, orderBy....
Get data: first(), get()
Save data: create($param2 = [])
Update data: update($id, $param2 = [])
attributeStatistics($type)
Return a list of attributes from information_attributes
table filtered by type
.
Example usage with $help
: $help->table('information_attributes')->where('type', $type)->get();
attributeStatisticsId($name, $type)
Return the first attribute matching name
and type
from information_attributes
table.
Example usage: $help->table('information_attributes')->where('type', $type)->where('name', $name)->first();
getComposerSonArrayWhere($category, $slug, $help, ...)
Build a nested tree array of composer items from table $slug
, filtered by conditions.
Uses $help->table($slug)
with filters like where
, whereIn
.
Supports optional filters and language checks.
getComposerSonArray($category, $slug, $help)
Recursively get nested composer items by IDs from $help->table($slug)
.