Skip to content

Commit 400e2bd

Browse files
committed
- rename LaravelEnum in LaravelEnumHelper
1 parent 788452e commit 400e2bd

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Total Downloads](https://img.shields.io/packagist/dt/datomatic/laravel-enum-helper.svg?style=for-the-badge)](https://packagist.org/packages/datomatic/laravel-enum-helper)
88

99
This is an extension of the [datomatic/enum-helper](https://github.com/datomatic/enum-helper) package based on Laravel Framework.
10-
The package consists on a `LaravelEnum` trait that extends `EnumHelper` (`EnumInvokable`, `EnumFroms`, `EnumNames`,
10+
The package consists on a `LaravelEnumHelper` trait that extends `EnumHelper` (`EnumInvokable`, `EnumFroms`, `EnumNames`,
1111
`EnumValues`, `EnumEquality`) and add dynamic methods to return a translation or "property" method and
1212
relative helper methods.
1313

@@ -48,15 +48,15 @@ composer require datomatic/laravel-enum-helper
4848

4949
## Usage
5050

51-
You can use this functionality simply using the `LaravelEnum` trait.
51+
You can use this functionality simply using the `LaravelEnumHelper` trait.
5252

5353
```php
54-
use Datomatic\LaravelEnumHelper\LaravelEnum;
54+
use Datomatic\LaravelEnumHelper\LaravelEnumHelper;
5555

5656
// Pure enum
5757
enum Status
5858
{
59-
use LaravelEnum;
59+
use LaravelEnumHelper;
6060

6161
case PENDING;
6262
case ACCEPTED;
@@ -77,7 +77,7 @@ enum Status
7777
// BackedEnum
7878
enum StatusString
7979
{
80-
use LaravelEnum;
80+
use LaravelEnumHelper;
8181

8282
case PENDING = 'P';
8383
case ACCEPTED = 'A';
@@ -228,6 +228,6 @@ Status::descriptionsAsSelect([Status::DISCARDED, Status::NO_RESPONSE], 'it'); //
228228

229229
## Laravel Nova Enum Field
230230
If you are using [Laravel Nova](https://nova.laravel.com/) Administrator Panel you can use a package to support the `enum-helper` or/and `laravel-enum-helper`.
231-
This package adds the PHP 8.1 `enum`, `EnumDescription` and `LaravelEnum` traits support to Nova, with a Nova Select and Nova Boolean filters ready out of the box.
231+
This package adds the PHP 8.1 `enum`, `EnumDescription` and `LaravelEnumHelper` traits support to Nova, with a Nova Select and Nova Boolean filters ready out of the box.
232232

233233
Package: [datomatic/nova-enum-field](https://github.com/datomatic/nova-enum-field)

src/LaravelEnum.php renamed to src/LaravelEnumHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Datomatic\LaravelEnumHelper\Exceptions\TranslationMissing;
1111
use Illuminate\Support\Str;
1212

13-
trait LaravelEnum
13+
trait LaravelEnumHelper
1414
{
1515
use EnumProperties;
1616
use EnumHelper {

tests/Support/Enums/Status.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Datomatic\LaravelEnumHelper\Tests\Support\Enums;
66

7-
use Datomatic\LaravelEnumHelper\LaravelEnum;
7+
use Datomatic\LaravelEnumHelper\LaravelEnumHelper;
88

99
/**
1010
* @method static string pending()
@@ -14,7 +14,7 @@
1414
*/
1515
enum Status
1616
{
17-
use LaravelEnum;
17+
use LaravelEnumHelper;
1818

1919
case PENDING;
2020

tests/Support/Enums/StatusInt.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Datomatic\LaravelEnumHelper\Tests\Support\Enums;
66

7-
use Datomatic\LaravelEnumHelper\LaravelEnum;
7+
use Datomatic\LaravelEnumHelper\LaravelEnumHelper;
88

99
/**
1010
* @method static string pending()
@@ -14,7 +14,7 @@
1414
*/
1515
enum StatusInt: int
1616
{
17-
use LaravelEnum;
17+
use LaravelEnumHelper;
1818

1919
case PENDING = 0;
2020

tests/Support/Enums/StatusPascalCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Datomatic\LaravelEnumHelper\Tests\Support\Enums;
66

7-
use Datomatic\LaravelEnumHelper\LaravelEnum;
7+
use Datomatic\LaravelEnumHelper\LaravelEnumHelper;
88

99
/**
1010
* @method static string pending()
@@ -14,7 +14,7 @@
1414
*/
1515
enum StatusPascalCase
1616
{
17-
use LaravelEnum;
17+
use LaravelEnumHelper;
1818

1919
case Pending;
2020

tests/Support/Enums/StatusString.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Datomatic\LaravelEnumHelper\Tests\Support\Enums;
66

7-
use Datomatic\LaravelEnumHelper\LaravelEnum;
7+
use Datomatic\LaravelEnumHelper\LaravelEnumHelper;
88

99
/**
1010
* @method static string pending()
@@ -14,7 +14,7 @@
1414
*/
1515
enum StatusString: string
1616
{
17-
use LaravelEnum;
17+
use LaravelEnumHelper;
1818

1919
case PENDING = 'P';
2020

0 commit comments

Comments
 (0)