jeudi 1 septembre 2016

Laravel 5.2 enums with database

I have a table called role with 5 columns (id,name,role,created_At,update_at). I need to create a enum ADMINISTRATOR => 'Adinistrador',EMPLOYEE=>'Colaborador'in the databse. And i need access to verifie if is admin, my though is put the query smeting like this: table->role(ADMINISTRATOR);

Is a beter way to do enums with database?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire