Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple databases #4

Closed
ingalless opened this issue Oct 25, 2019 · 4 comments · Fixed by #5
Closed

Support multiple databases #4

ingalless opened this issue Oct 25, 2019 · 4 comments · Fixed by #5

Comments

@ingalless
Copy link
Contributor

Hi, great package idea!

I noticed the package appears to only support mysql.
The code is in LogRouteUsage.php

DB::statement(
    "INSERT INTO route_usage
            (`identifier`, `method`, `path`, `status_code`, `action`, `created_at`, `updated_at`)
        VALUES (?, ?, ?, ?, ?, ?, ?)
        ON DUPLICATE KEY UPDATE `updated_at` = '{$date}'",
    [$identifier, $method, $path, $status_code, $action, $date, $date]
);

I think it would be possible to support multiple databases with a change in LogRouteUsage.php

I'll submit a pull request once I've got the tests passing 👍

@faizananwerali
Copy link

+1

2 similar comments
@kasperhartwich
Copy link

+1

@oaloria
Copy link

oaloria commented Nov 19, 2019

+1

@julienbourdeau
Copy link
Owner

Hi 👋

I have release 0.4 with support for other databases: https://github.com/julienbourdeau/route-usage/releases/tag/0.4

Thanks for your help and inputs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants