Route model binding already returns a 404 if a model is not found through its ID, thus rendering the code performing that validation useless.
Signed-off-by: miguel456 <me@nogueira.codes>
This commit introduces a short performance boost by counting the records in the query itself, instead of doing that in the collection Laravel returns.
Signed-off-by: miguel456 <me@nogueira.codes>
This commit adds several missing "cascade delete" actions to relationships on database tables. This effectively fixes errors while trying to delete user accounts because of pending child records.
Additionally, the observers for applications and vacancies were removed, since they are now obsolete.
The account deletion system was also refactored.
This commit adds a feature that allows users to request periods of inactivity from their managers. This is effectively known as a leave of absence.
The commit also introduces new permissions and migrations, therefore, you'll need to adapt your database according to these changes.
BREAKING CHANGE: This commit updates the Laravel framework to version 9. Additionally, it also updates outdated and abandoned dependencies in the composer.json file.
The resources/lang directory has also been moved to the repository's root directory.
This commit rewrites the previously broken auto ban cleaner. It's now much more efficient and compact, and it removes bans correctly and on the right date.
Fixes#1
This commit introduces a new feature where users can disable the collection and display of IP addresses. It's hardcoded in the .env config file for security reasons, and demo mode ignores this setting, because it already hides IPs by default.
This commit moves most controller logic onto Services. Services are part of the Service-Repository pattern. The models act as repositories.
Services are easily testable and are needed for the upcoming API, in order to avoid duplicated code and to maintain a single source of "truth".
The User, Vacancy and Vote controllers still need their logic moved onto services.
Implemented a Reddit-like account suspension system (similar to subreddit bans). This makes it easier to ban users from the app, and the code has also been cleaned up.
The interface was also revamped.