Skip to main content

daravel_mysql 1.4.0 copy "daravel_mysql: ^1.4.0" to clipboard
daravel_mysql: ^1.4.0 copied to clipboard

MySQL and MariaDB driver for Daravel, so a Daravel application can share a MySQL database with a Laravel application.

example/main.dart

import 'package:daravel/daravel.dart';
import 'package:daravel_mysql/daravel_mysql.dart';

/// Serves an application on MySQL (`DB_CONNECTION=mysql` and `DB_*` in
/// `.env`).
Application createApp() =>
    Application.configure(basePath: '.')
        .withDatabaseDriver('mysql', MySqlDriver.fromConfig)
        .withDatabaseDriver('mariadb', MySqlDriver.fromConfig)
        .withRouting(
          api: (router) => router.get(
            '/tables',
            (_) async => {'tables': await (await Schema.builder()).getTables()},
          ),
        )
        .create();

Future<void> main() async => Application.serveWith(createApp);
0
likes
0
points
0
downloads

Documentation

Documentation

Publisher

verified publisherdaravel.teoprayoga.my.id

Weekly Downloads

MySQL and MariaDB driver for Daravel, so a Daravel application can share a MySQL database with a Laravel application.

Homepage
Repository (GitHub)
View/report issues

Topics

#mysql #mariadb #database #server #backend

License

unknown (license)

Dependencies

daravel, mysql_dart

More

Packages that depend on daravel_mysql