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

Using the uuid data type for the user ID #71

Open
bersyatina opened this issue Oct 20, 2023 · 0 comments
Open

Using the uuid data type for the user ID #71

bersyatina opened this issue Oct 20, 2023 · 0 comments

Comments

@bersyatina
Copy link

Hi! I wanted to connect this package to a project where the user id has the uuid data type. In the CreateFirewallLogsTable database migration class, I replaced:
$table->integer('user_id')->nullable();
with
$table->uiid('user_id')->nullable();.
However, when logging into the application as a registered user, I get an error:
"Cannot assign string to property Akaunting\Firewall\Abstracts\Middleware::$user_id of type ?int"
I tried to extend the abstract class Akaunting\Firewall\Abstracts\Middleware and redefine the public property $user_id in the trait Akaunting\Firewall\Traits\Helper. But I expectedly got a fatal error. Maybe this can be done using getters...
How do I get around this error to use the uuid data type? Is there a right way?

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

No branches or pull requests

1 participant