BSIT-Caprock / barangay-system

Barangay Information System for the municipality of Barugo, Leyte.
0 stars 0 forks source link

Fix not null constraint failed (barangay_id) in tables household,house, and streets table #109

Closed maridanne closed 11 months ago

maridanne commented 11 months ago

Tasks

How to run tests

php artisan test --parallel

Results

Results of tests/screenshots of user interface...

jmarkfen commented 11 months ago

Not null constraint failed

barangay_id is automatically filled when a user is authenticated. This is handled by app/Providers/EventServiceProvider.php

jmarkfen commented 11 months ago

Automatically filling in barangay_id only works when a user is authenticated.

https://github.com/BSIT-Caprock/barangay-system/blob/2bcc424e2abc0c1e7c1852b136df299277f6011d/app/Providers/EventServiceProvider.php#L35-L46