Helper is an added function that you can use to simplify

NameDesc
g($name)Used to get the value of the data sent by the user through POST and GET, this is an alias of Facade Request laravel
now()Generate time to format the Y-m-d H: i: s
CRUDBooster::getSetting($name)

To get the value of the existing settings on Settings Management. Examples to get the name of the application by:

CRUDBooster::getSetting('appname');
CRUDBooster::insert($table,$data)Function alias of laravel Insert. The difference is this insert can produce ID Primary Key automatically when your database does not support auto increment.
CRUDBooster::first($table,$id)

Function alias of laravel First

$table is filled with the name of the table

$id can be filled directly with ID related data, or you can charge $ Id with the array as the following example:

CRUDBooster::first('posts',['status'=>'active','id'=>$id]);
CRUDBooster::me()Generate SQL Data Query Object of your current user table (Login)
CRUDBooster::myId()Generate your current user ID
CRUDBooster::isSuperadmin()Returns boolean TRUE / FALSE whether the user is currently logged Super Admin or not
CRUDBooster::myName()Generate user name
CRUDBooster::myPhoto()Url generate user photo
CRUDBooster::myPrivilegeId()Generate your Privilege ID (table cms_privileges)
CRUDBooster::myaPrivilegeName()Produce name of your privilege
CRUDBooster::redirect($to,
$message,$type)

Helper is used to redirect to a specific url, also of laravel Redirect aliases. However, this helper is equipped parameter $ message and $ type

$message = fill in the information message

$type =fill in the type of information (warning, info, primary, success, danger)

CRUDBooster::isView()Generate a boolean value whether the user can access the view
CRUDBooster::isUpdate()Generate a boolean value whether the user can perform Update
CRUDBooster::isCreate()Generate a boolean value whether the user can perform Create
CRUDBooster::isRead()Generate a boolean value whether the user can perform Read
CRUDBooster::isDelete()Generate a boolean value whether the user can perform Delete
CRUDBooster::getCurrentModule()Generate Object Query of modules currently accessible
CRUDBooster::deleteConfirm($redirectTo)

This helper will make a confirmation dialog functions of SweetAlert

$redirectTo = fill in the destination URL if the user presses the OK button

CRUDBooster::getModulePath()Generate the path name / slug module that is currently being accessed
CRUDBooster::mainpath($slug=NULL)

Generate URL base path from the module that is currently being accessed, you can combine the $slug you want

Example you are accessing the module posts:

CRUDBooster::mainpath()

Output

http://domain/public/admin/posts

The combination with the slug:

CRUDBooster::mainpath('custom-method');

Output 

http://domain/public/admin/posts/custom-method
CRUDBooster::adminPath($slug=NULL)

Produce base URL of the admin area.

Output 

http://domain/public/admin

Combination slug:

CRUDBooster::adminPath('custom/method');

Output

http://domain/public/admin/custom/method
CRUDBooster::getCurrentId()

Produce integer ID today. Suppose you're accessing the edit page (edit method). Then you can get the ID with this helper.

This helper is usually used when making adjustments to the scaffolding
CRUDBooster::getCurrentMethod()

Generate method name is currently being browsed

Eg : 

CRUDBooster::getCurrentMethod()

Output : 

getAdd
CRUDBooster::sendEmail($config=[])

Helper is used to send emails.

To use this helper you MUST create email templates first.

There are several keys that you need to fill in, among others

Example 

$data = ['name'=>'John Doe','address'=>'Lorem ipsum dolor...'];
CRUDBooster::sendEmail(['to'=>'john@gmail.com','data'=>$data,'template'=>'order_success']);
CRUDBooster::sendNotification($config=[])

This helper is to create a notification

$config['content'] = fill a message content

$config['to'] = fill a destination url

$config['id_cms_users'] = (array) fill an array of id cms users, instead your id user will be used

CRUDBooster::sendFCM($regid,$data)

This helper is to send a fcm notification to mobile app. Please make sure you have define a google api key server for FCM at setting page

$regid = (array) fill the reg ids

$data['title'] = fill the title of message

$data['content'] = fille the content of message

$data['your_other_key'] = you may add other message here