本项目基于 jackfinal/laravel-dm8 构建,并针对 Laravel10,Laravel11 进行了适配与改进。
- 源项目GitHub: https://github.com/Jackfinal/laravel-dm8.git
Laravel-DM8 is an Dm Database Driver package for Laravel. Laravel-DM8 is an extension of Illuminate/Database that uses DM8 extension to communicate with Dm. Thanks to @yajra.
- You will find user-friendly and updated documentation here: Laravel-DM8 Docs
- All about dm and php:The Underground PHP and Dm Manual
| Laravel | Package |
|---|---|
| 10.x.x | 1.x.x |
| 11.x.x | 1.x.x |
composer require wangl/laravel-dm8Once Composer has installed or updated your packages you need to register Laravel-DM8. Open up config/app.php and find the providers key and add:
LaravelDm8\Dm8\Dm8ServiceProvider::class,Finally you can optionally publish a configuration file by running the following Artisan command.
If config file is not publish, the package will automatically use what is declared on your .env file database configuration.
This will copy the configuration file to config/database.php.
Then, you can set connection data in your
.envfiles:
'connections' => [
'mysql' => [
…………
],
'dm' => [
'driver' => 'dm',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5236'),
'database' => env('DB_DATABASE', 'laravel'),
'username' => env('DB_USERNAME', 'laravel'),
'password' => env('DB_PASSWORD', 'laravel'),
'charset' => 'UTF8',
'collation' => 'utf8_general_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
'options' => [
\PDO::ATTR_PERSISTENT => true,
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
],
],
],Then run your laravel installation...
The MIT License (MIT). Please see License File for more information.