prateik / core-php
Connection class for core php development
Requires
- php: ^5.6 || ^7.0
- phpunit/phpunit: ^5.7.10
This package is auto-updated.
Last update: 2025-06-08 09:08:41 UTC
README
same as laravel all the configuration you can use .env
file for storing all configurations.
Also this package contains enable log and get all error logs in your root directory of project's log directory.
Log will only be generated when APP_DEBUG=true
has been set in .env file
Database connection will be generated once you set the details in .env
DB_HOST=localhost
DB_DATABASE=<databasename>
DB_USERNAME=<username>
DB_PASSWORD=<databasepassword>
this variables can be accessed by getenv(<variablename>)
.
After defining parameters, a default pdo connection will been generated.
Create a new class with extending Connection
class allows you to use pdo object using
$yourClassName->pdo