11 New User Notifications
Select a tab above to activate This blank page message helps protect your privacy, or you can show the first message here automatically through settings page
- Melissa Ayre INBOX Re: New security codes Hello again and thanks for being part... 56 seconds ago
- Adison Lee Msed quia non numquam eius 2 minutes ago
- Oliver Kopyuv Msed quia non numquam eius 3 days ago
- Dr. John Cook PhD Msed quia non numquam eius 2 weeks ago
- Sarah McBrook Msed quia non numquam eius 3 weeks ago
- Anothony Bezyeth Msed quia non numquam eius one month ago
- Lisa Hatchensen Msed quia non numquam eius one year ago
-
Administrator UPDATE System updated to version 4.6.3 (patch notes) 5 mins ago
-
Adison Lee replied to your video Cancer Drug Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day... 10 minutes ago
[your date here]
|
||||||
---|---|---|---|---|---|---|
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
30 | 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | 1 | 2 | 3 |
2:30PM - Doctor's appointment
3:30PM - Report overview
4:30PM - Meeting with Donnah V.
5:30PM - Late Lunch
6:30PM - Report Compression
- SmartAdmin
- PHP Components
- Utilities
Utilities PHP Utilities
Documentation
Utilities
SmartAdmin PHP includes various utilities that are read-to-use in your everyday workflow. These utilities does not belong to any framework and they are straightforward.
Write easy
Below are the common functions that SmartAdmin PHP uses.
plog
Stands for print log. This handy function can almost "print" everything, well formatted too. Whenever you need to debug something or just output a simple array, this function is your friend.
plog(string $msg [, bool $newline = true, array $options = [], bool $return = false]);
Example
$my_data = [
'foo' => 'bar',
'test' => 'data'
];
plog($my_data);
Output
Array (
[foo] => bar
[test] => data
)
get
A simple yet powerful function that gets a value, of everything! This function will save you tons of time validating data by using something like isset
.
get(string $field [, mixed $data = $_GET, mixed $default = null, array $possible_values = []])
Example
$data = [
'key' => 1,
'key_2' => 2
];
// returns $default, which is null
$value = get('key', $data); // returns 1
If $data
is not provided, it uses the global $_GET
variable as data source.
dt
A simple function that generates Date
strings. Straightforward and easy to write.
dt(mixed $date [, string $format = 'Y-m-d H:i:s'])
Example
dt('now', 'm/d/Y'); // returns 07/01/2019
Other utils
Checkout lib/func.php
to get the list of utilities used by SmartAdmin PHP.
Credits
Some of these functions are derived from lodev09/php-utils package created by @lodev09.