for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Migratio\GrammarStructure\Mysql\Traits;
trait QueryStack
{
/**
* @return mixed
*/
public function connection()
return $this->schema->getConnection();
}
public function showTables()
return $this->connection()->query('SHOW TABLES')->fetchAll();
* @param $table
public function showColumnsFrom($table)
return $this->connection()->query('SHOW COLUMNS FROM '.$table)->fetchAll();
* @param $query
public function setQueryBasic($query)
try {
$query =$this->connection()->query($query);
return [
'result'=>true,
'query'=>$query,
'message'=>null,
];
catch (\PDOException $exception){
'result'=>false,
'message'=>$exception->getMessage(),