I know I can override a table in a model by doing
protected $table = 'my_custom_table';
But is there a way to enforce custom table naming convention so that I don't have to do this in each model separately?
For example:
public function getTable(){
return env('DB_PREFIX') . '_' . $module_name . '_' . $entity_name
}
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2RiY8le
via IFTTT
Aucun commentaire:
Enregistrer un commentaire