$field; } else { return "Not Found in Table"; } } static function getRow($tableName, $condition = "1") { $tableName = strtolower($tableName); $t = "select * from $tableName where $condition"; $Value = DB::select($t); return (empty($Value) ? "Not Found" : $Value[0]); } static function getRowByQuery($query) { $Value = DB::select($query); return (empty($Value) ? false : $Value[0]); } static function getTableByQuery($query) { $Value = DB::select($query); return (empty($Value) ? false : $Value); } static function updateRow($tableName, $fieldName, $fieldValue, $referenceField, $referenceValue) { $tableName = strtolower($tableName); $t = "update $tableName set $fieldName='$fieldValue' where $referenceField=$referenceValue"; return DB::select($t); } public static function pre($array) { echo "
";
        print_r($array);
        echo "
"; } public static function addButton($path, $text) { ?>
  • "; BibClass::addButton("edit/$pk", 'Edit'); BibClass::addButton("view/$pk", 'View'); BibClass::addButton("destroy/$pk", 'Delete'); } public static function getController() { $routeArray = app('request')->route()->getAction(); $controllerAction = class_basename($routeArray['controller']); list($controller, $action) = explode('@', $controllerAction); print_r($controller); } public static function createSidebarMenu($link, $name, $target = "") { ?>
  • >
  • $TableCol; ?>
    Field; switch ($tableField) { case $Table_pk: case 'status': case 'created_at': case 'updated_at': break; default: createInput("text", $tableField, $tableField, $tableField, "", "", ""); } } } }