Skip to content

Commit

Permalink
feat: add PHP enums
Browse files Browse the repository at this point in the history
  • Loading branch information
kamgrzeski committed Nov 26, 2024
1 parent 2f9ffd2 commit 28396d2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/Enums/RoleType.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

namespace App\Enums;

enum RoleType: int
{
case USER_TYPE = 1;
case ADMIN_TYPE = 2;
}
8 changes: 8 additions & 0 deletions app/Enums/Settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace App\Enums;

enum Settings: string
{
case CURRENCY = 'currency';
}

0 comments on commit 28396d2

Please sign in to comment.