Skip to content

scrawler-labs/database

Repository files navigation

Scrawler Database

GitHub Workflow Status  Codecov  PHPStan Enabled Packagist Version (including pre-releases)  GitHub License

🔥Wrapper around Arca ORM to be integrated with scrawler framework 🔥
🇮🇳 Made in India 🇮🇳

💻 Installation

You can install Scrawler App via Composer. If you don't have composer installed , you can download composer from here

composer require scrawler/database

✨ Basic usage

Repo of Arca Orm: https://github.com/scrawler-labs/arca-orm

<?php

require __DIR__ . '/vendor/autoload.php';

 $connectionParams = array(
        'dbname' => 'YOUR_DB_NAME',
        'user' => 'YOUR_DB_USER',
        'password' => 'YOUR_DB_PASSWORD',
        'host' => 'YOUR_DB_HOST',
        'driver' => 'pdo_mysql', //You can use other supported driver this is the most basic mysql driver
    );

db()->connect($connectionParams);

$user = db()->create('user');
$user->name = 'test user';
$user->age = 12;
$user->save();

About

Arca ORM integration bridge for scrawler router

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages