Download the PHP package sehentak/php-kan-sql without Composer

On this page you can find all versions of the php package sehentak/php-kan-sql. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-kan-sql

PHP-Kan-SQL

PHP-Kan-SQL adalah sebuah library baris perintah (CLI) yang sangat ringan untuk developer PHP yang ingin mempercepat pembuatan RESTful API. Cukup dengan menyediakan file skema .sql, library ini akan secara otomatis menghasilkan Controller dan Model fungsional menggunakan PDO murni, tanpa ketergantungan pada framework apa pun.

Terinspirasi dari sqlc untuk Go, alat ini bertujuan untuk membawa kemudahan yang sama ke dalam ekosistem PHP. ✨ Fitur Utama

Generator Kode Fungsional: Menghasilkan kode Controller dengan logika CRUD (Create, Read, Update, Delete) yang lengkap dan siap pakai.

PDO Murni: Tidak ada ketergantungan pada framework. Kode yang dihasilkan dapat berjalan di proyek PHP mana pun, baik itu vanilla PHP, Slim, atau framework lainnya.

Deteksi Soft Delete: Secara otomatis mendeteksi kolom deleted_at dan menghasilkan logika soft delete serta metode restore() yang sesuai.

Mode Setup End-to-End: Opsi --setup dapat secara instan membuat struktur proyek API sederhana yang bisa langsung dijalankan, lengkap dengan router dan konfigurasi server contoh (Apache/Nginx).

Instalasi Dependensi Otomatis: Dalam mode --setup, dependensi yang diperlukan seperti vlucas/phpdotenv akan diinstal secara otomatis.

🚀 Instalasi

Anda dapat menambahkan PHP-Kan-SQL sebagai dependensi ke dalam proyek Anda menggunakan Composer.

composer require sehentak/php-kan-sql

(Catatan: Saat ini, library ini belum dipublikasikan ke Packagist. Untuk testing lokal, silakan lihat panduan Wiki). 💡 Cara Penggunaan

Setelah terinstal, Anda bisa memanggil perintah make:crud dari direktori root proyek Anda melalui vendor/bin/generate. Mode Standar (Hanya Generator Kode)

Mode ini hanya akan menghasilkan file Model dan Controller di dalam struktur proyek Anda yang sudah ada.

Perintah:

vendor/bin/generate make:crud path/ke/file_skema.sql

Contoh:

vendor/bin/generate make:crud database/schema/users.sql

Hasil:

src/Models/User.php

src/Http/Controllers/UserController.php

Mode End-to-End (--setup)

Mode ini akan membuat API sederhana yang bisa langsung dijalankan.

Perintah:

Untuk Apache (default)

vendor/bin/generate make:crud path/ke/file_skema.sql --setup

Atau secara eksplisit

vendor/bin/generate make:crud path/ke/file_skema.sql --setup=apache

Untuk Nginx

vendor/bin/generate make:crud path/ke/file_skema.sql --setup=nginx

Hasil Tambahan (Selain Model & Controller):

bootstrap/database.php

public/index.php

.env.example

public/.htaccess (jika menggunakan --setup=apache)

nginx.conf.example (jika menggunakan --setup=nginx)

Dependensi vlucas/phpdotenv akan otomatis ditambahkan ke composer.json Anda.

🤝 Berkontribusi

Kontribusi dalam bentuk apa pun sangat kami hargai! Silakan lihat CONTRIBUTING.md untuk panduan lebih lanjut tentang cara berkontribusi pada proyek ini. 📜 Lisensi

Proyek ini dilisensikan di bawah Lisensi MIT. Lihat file LICENSE untuk detail lebih lanjut.


All versions of php-kan-sql with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
symfony/console Version ^7.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sehentak/php-kan-sql contains the following files

Loading the files please wait ...