Commit Graph

11 Commits

Author SHA1 Message Date
Miguel Nogueira 8942623bde
Added services
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.
2021-07-25 22:54:15 +01:00
Miguel Nogueira abace4e85b
Setting categorization system
This categorization system aims to prevent mixing different options together.
2021-01-06 01:29:01 +00:00
Miguel Nogueira baddf3fc76
Save value instead of raw model to cache 2021-01-06 01:02:47 +00:00
Miguel Nogueira 6518ad3447
Fixed #2
This method would always fail for cached options because at the end it was expecting an Eloquent model, which would never be populated if the requested value was cached in the first place.

Uncached requests wouldn't fail because the exec path would lead to $value being a Model.

Also removed reference to old feature causing application page to crash.
2020-12-08 00:07:53 +00:00
Miguel Nogueira 96aa01b9c6 Recent changes 2020-11-02 21:44:05 +00:00
Miguel Nogueira 6541e25a39 Apply fixes from StyleCI 2020-10-10 16:30:26 +00:00
Miguel Nogueira 27b1f3170b Update settings log level 2020-08-31 20:02:30 +01:00
Miguel Nogueira 2afea88846 Added logging to Settings 2020-08-31 19:47:27 +01:00
Miguel Nogueira ea96cbc1f5 Options: return value instead of whole model 2020-08-31 18:54:33 +01:00
Miguel Nogueira 2996e66c8b Add missing query builder statement for options 2020-08-31 18:51:35 +01:00
Miguel Nogueira ca82f5882d Add settings page 2020-08-30 23:06:01 +01:00