Compare commits

..

1 Commits
0.1.4 ... 0.1.5

Author SHA1 Message Date
Deon George
55d369df47 Added helpers.php 2018-06-12 16:09:27 +10:00
2 changed files with 19 additions and 1 deletions

View File

@@ -18,7 +18,10 @@
"autoload": {
"psr-4": {
"Leenooks\\": "src"
}
},
"files": [
"src/helpers.php"
]
},
"extra": {
"laravel": {

15
src/helpers.php Normal file
View File

@@ -0,0 +1,15 @@
<?php
// is_json helper
if (! function_exists('is_json')) {
function is_json($string) {
try {
json_decode($string);
} catch (\Exception $e) {
return FALSE;
}
return (json_last_error() == JSON_ERROR_NONE);
}
}