haruncpi / laravel-user-activity

Monitor user activity easily!
https://laravelarticle.com/laravel-user-activity
424 stars 53 forks source link

PostgreSQL support #4

Closed affektde closed 3 years ago

affektde commented 3 years ago

https://github.com/haruncpi/laravel-user-activity/blob/583a2541cbcb6cffa252c874735614c3fb688842/src/Controllers/ActivityController.php#L100

$all = array_map('reset', DB::select('SHOW TABLES'));

This is not suppored by posgres databases.

I will try to fork and make a PR. Maybe my first ever :-D Hope I will do it right :-)

affektde commented 3 years ago

https://github.com/haruncpi/laravel-user-activity/pull/5 I hope I did everything right with the PR.

affektde commented 3 years ago

https://github.com/haruncpi/laravel-user-activity/pull/5/commits/a84cf20a3576c8f5d5c41954bd2702d3889ed7f2

I've also included the new new Laravel 8 Eloquent Model Conventions.

So I've changed App\User to App\Models\User.

haruncpi commented 3 years ago

App\Models\User namespace is not work below latest version laravel 8.*

If i'm not wrong, most of developer still using below 8.0

affektde commented 3 years ago

https://github.com/haruncpi/laravel-user-activity/pull/5/commits/af0df2e30df128cd4881650ea57754b83a6c22de

App\Models\User namespace is not work below latest version laravel 8.* If i'm not wrong, most of developer still using below 8.0

Okay, so with this code both namespaces should work.

haruncpi commented 3 years ago

added. thank you!