Alternatives to using Eloquent Accessor
Using computed columns in MySQL
Last updated
Using computed columns in MySQL
Last updated
Article illustrating how it is possible to use computed columns in our database tables to create additional model fields other than by using accessors.
Particularly useful where the model is exported via API or as an array and needs additional derived data.