Closed andy-UKC closed 4 months ago
The Metable.php
file followed the conventions used elsewhere, but I had to create an init()
function in MetaData.php, and call it when creating the class in Metable
. There may be a better way to handle passing of the value
column, feel free to refactor it
This PR has many problems.
The init
method in MetaData.php
never gets called.
In MetaData.php
we have a mutator for value
column that will call the setValueAttribute
method in MetaData.php
. Changing the column name for value
will result in this mutator never getting called.
Since we're defining the key and value column names in the model that has the Metable
trait, and there is no direct relation between MetaData
and other models, it's impossible to know what the key and value are in MetaData
.
What is the purpose of this PR?
To override the
key
andvalue
column in the_meta
table, the following can be used