I have two fields in almost every table
of my DB
, they are created_by
and modified_by
. So, right now I have this in my controller
:
$request['created_by'] = Auth::user->id;
$request['modified_by'] = Auth::user->id;
I was thinking that I should turn this into middleware
or something a little more RESTful
but I don't know how I would go about this. It is being used in 100% of my store
methods right now, but it's possible that down the road I will have a table
that doesn't have these two fields, which is where I get confused.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire