-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
259 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Upgrade Guide | ||
|
||
## 0.x to 1.x | ||
|
||
Previously we had model within that package you had to extend but now you don't, you just need to use our trait like you would with `HasUlid` & `HasUuid` in Laravel | ||
|
||
```diff | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
- use Malico\LaravelNanoid\Eloquent\Model; | ||
+ use Illuminate\Database\Eloquent\Model; | ||
+ use Malico\LaravelNanoid\HasNanoids; | ||
|
||
class Payment extends Model { | ||
+ use HasNanoids; | ||
} | ||
``` | ||
|
||
Also, we added, `nanoidPrefix` and `nanoidLength`, like | ||
|
||
```php | ||
public function nanoidLength(): int { | ||
return 2; | ||
} | ||
|
||
public function nanoidPrefix(): string { | ||
return 'pay_' | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.