furkifor / sql_dumper
Laravel eloquent mantığıyla orm işlemlerinde sql çıktısı alma projesi
Fund package maintenance!
FurkiFor
v0.2
2024-08-28 07:33 UTC
Requires
- php: ^7.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.17
- phpunit/phpunit: ^9.5
- spatie/ray: ^1.10
- vimeo/psalm: ^4.3
This package is auto-updated.
Last update: 2024-10-28 07:55:58 UTC
README
composer require furkifor/sql_dumper
Kullanımı
$sql_dumper = new Furkifor\SqlDumper("TABLE_NAME"); echo $sql_dumper->select('*')->get(); // select * from TABLE_NAME
Migrate Kullanımı
$table = new MigrateClass("mysql"); $table->name("users") ->string('username',255)->unique()->notnull() ->string('email',255)->unique()->notnull() ->string('password',255)->notnull() ->datetime('created_at')->default("CURRENT_TIMESTAMP") ->int('role_id')->notnull()->foreignKey('roles','id')->check("role_id>0") ->createTable(); /* CREATE TABLE users ( id INT(11) AUTO_INCREMENT PRIMARY KEY NOT NULL, username VARCHAR(255) NOT NULL UNIQUE, email VARCHAR(255) NOT NULL UNIQUE, password VARCHAR(255) NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP, role_id INT NOT NULL, FOREIGN KEY (role_id) REFERENCES roles(id), CHECK (role_id > 0) ) */
License
The MIT License (MIT). Please see License File for more information.