PHPackages                             crudly/connectly - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Admin Panels](/categories/admin)
4. /
5. crudly/connectly

ActiveLibrary[Admin Panels](/categories/admin)

crudly/connectly
================

1.1.2(6y ago)7121MITPHPCI failing

Since Apr 28Pushed 3y ago2 watchersCompare

[ Source](https://github.com/Crudly/Connectly)[ Packagist](https://packagist.org/packages/crudly/connectly)[ Docs](https://github.com/crudly/connectly)[ RSS](/packages/crudly-connectly/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (4)Versions (6)Used By (0)

Connectly
=========

[](#connectly)

[![Build Status](https://camo.githubusercontent.com/3c9fdb5f5a76ce7250e05b5a908aee95eda66c7cef70bbb404599e5fca557d98/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f637275646c792f436f6e6e6563746c792f6d61737465723f7374796c653d666c61742d737175617265)](https://travis-ci.org/crudly/connectly)[![Release](https://camo.githubusercontent.com/c020183e0798b3888e2a1179857ed86fb0430dc5aa74a7767b256700a2e095aa/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f637275646c792f436f6e6e6563746c793f7374796c653d666c61742d737175617265)](https://github.com/crudly/connectly/releases/latest)[![License](https://camo.githubusercontent.com/bbf65a1196e4578833855212fa1c50c65aa015fd1169f1a7524966d722837cda/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f637275646c792f436f6e6e6563746c793f7374796c653d666c61742d737175617265)](LICENSE)

Store database connections on the database :) Everything encrypted.

```
$connectly = Connectly::create([
	'name' => 'My connection',
	'config' => [
		'driver' => 'mysql',
		'host' => '127.0.0.1',
		'port' => '3306',
		'database' => 'connectly_test_base',
		'username' => 'connectly_user',
		'password' => 'hunter2',
	],
]);

$myCon = Connectly::where('name', 'My connection')->first();

$connection = $myCon->connect();   // This is a Laravel DB connection

$connection->table('users')->get();
```

Installation
------------

[](#installation)

Use composer.

```
$ composer require crudly/connectly
```

Usage
-----

[](#usage)

Store a config for a Laravel DB connection in the `config` property. Laravel's default `config/database.php` contains some examples and [here](https://laravel.com/docs/7.x/database#configuration) is a more thorough description.

```
