// Get list of tables via the default connection
$list = \ManticoreDb::showTables();
// Get list of tables via the specified connection
$list = \ManticoreDb::connection('test')->showTables();
\ManticoreDb::table('t')->insert($data);
\ManticoreDb::table('t')->match($match)->where($where)->get();
use avadim\Manticore\QueryBuilder\Schema\SchemaTable;
class CreateManticoreProductsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
\ManticoreDb::create('products', function (SchemaTable $table) {
$table->timestamp('created_at');
$table->string('name');
$table->text('description');
$table->float('price');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
\ManticoreDb::table('products')->dropIfExists('users');
}
}
// Enable logging for all
ManticoreDb::setLogger(\Log::getLogger());
// Enable logging for the specified connection
ManticoreDb::connection('test')->setLogger(\Log::getLogger());
// Enable logging for the next query
ManticoreDb::table('test')->match($match)->where($where)->setLogger(\Log::getLogger())->get();
sh
php artisan vendor:publish --provider="avadim\Manticore\Laravel\ServiceProvider"
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.