feat: install and implementasi hash id
This commit is contained in:
parent
9b1b4e8d07
commit
7dca0c9231
@ -65,15 +65,15 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update bottle')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
'id' => $row->id,
|
||||
'editRoute' => route('studio.catalog.bottle.edit', $row->id),
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.catalog.bottle.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete bottle')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.catalog.bottle.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.bottle.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ public function columns(): array
|
||||
if (auth()->user()->can('update brand')) {
|
||||
if ($row->sort_order > 1) {
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'module' => 'brand',
|
||||
'direction' => 'up',
|
||||
'tooltip' => 'Naik',
|
||||
@ -46,7 +46,7 @@ public function columns(): array
|
||||
])->render();
|
||||
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'module' => 'brand',
|
||||
'direction' => 'first',
|
||||
'tooltip' => 'Pertama',
|
||||
@ -57,7 +57,7 @@ public function columns(): array
|
||||
|
||||
if ($row->sort_order < $maxSortOrder) {
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'module' => 'brand',
|
||||
'direction' => 'down',
|
||||
'tooltip' => 'Turun',
|
||||
@ -66,7 +66,7 @@ public function columns(): array
|
||||
])->render();
|
||||
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'module' => 'brand',
|
||||
'direction' => 'last',
|
||||
'tooltip' => 'Terakhir',
|
||||
@ -78,7 +78,7 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update brand')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Kategori',
|
||||
])->render();
|
||||
@ -86,8 +86,8 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('delete brand')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.catalog.brand.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.brand.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ public function columns(): array
|
||||
if (auth()->user()->can('update category')) {
|
||||
if ($row->sort_order > 1) {
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'module' => 'category',
|
||||
'direction' => 'up',
|
||||
'tooltip' => 'Naik',
|
||||
@ -37,7 +37,7 @@ public function columns(): array
|
||||
])->render();
|
||||
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'module' => 'category',
|
||||
'direction' => 'first',
|
||||
'tooltip' => 'Pertama',
|
||||
@ -48,7 +48,7 @@ public function columns(): array
|
||||
|
||||
if ($row->sort_order < $maxSortOrder) {
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'module' => 'category',
|
||||
'direction' => 'down',
|
||||
'tooltip' => 'Turun',
|
||||
@ -57,7 +57,7 @@ public function columns(): array
|
||||
])->render();
|
||||
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'module' => 'category',
|
||||
'direction' => 'last',
|
||||
'tooltip' => 'Terakhir',
|
||||
@ -69,7 +69,7 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update category')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Kategori',
|
||||
])->render();
|
||||
@ -77,8 +77,8 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('delete category')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.catalog.category.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.category.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -74,15 +74,15 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update perfume')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
'id' => $row->id,
|
||||
'editRoute' => route('studio.catalog.perfume.edit', $row->id),
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.catalog.perfume.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete perfume')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.catalog.perfume.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.perfume.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -57,15 +57,15 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update product')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
'id' => $row->id,
|
||||
'editRoute' => route('studio.catalog.product.edit', $row->id),
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.catalog.product.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete product')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.catalog.product.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.product.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update expense')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Kategori',
|
||||
])->render();
|
||||
@ -39,8 +39,8 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('delete expense')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.finance.expense.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.finance.expense.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update customer')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Customer',
|
||||
])->render();
|
||||
@ -46,8 +46,8 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('delete customer')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.loyalty.customer.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.loyalty.customer.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update tier')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
'id' => $row->id,
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Tier',
|
||||
])->render();
|
||||
@ -39,8 +39,8 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('delete tier')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.loyalty.tier.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.loyalty.tier.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -95,15 +95,15 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update voucher')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
'id' => $row->id,
|
||||
'editRoute' => route('studio.loyalty.voucher.edit', $row->id),
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.loyalty.voucher.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete voucher')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.loyalty.voucher.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.loyalty.voucher.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -106,15 +106,15 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update outlet')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
'id' => $row->id,
|
||||
'editRoute' => route('studio.master.outlet.edit', $row->id),
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.master.outlet.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete outlet')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.master.outlet.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.master.outlet.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
|
||||
@ -132,15 +132,15 @@ public function columns(): array
|
||||
if (auth()->id() !== $row?->user?->id) {
|
||||
if (auth()->user()->can('update user')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
'id' => $row->id,
|
||||
'editRoute' => route('studio.master.user.edit', $row->id),
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.master.user.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete user')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
'id' => $row->id,
|
||||
'deleteRoute' => route('studio.master.user.delete', $row->id),
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.master.user.delete', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null
|
||||
$this->modalTitle = $modalTitle;
|
||||
|
||||
if ($id) {
|
||||
$this->form->setBrand(BrandModel::findOrFail($id));
|
||||
$this->form->setBrand(BrandModel::byHashOrFail($id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null
|
||||
$this->modalTitle = $modalTitle;
|
||||
|
||||
if ($id) {
|
||||
$this->form->setCategory(CategoryModel::findOrFail($id));
|
||||
$this->form->setCategory(CategoryModel::byHashOrFail($id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null
|
||||
$this->modalTitle = $modalTitle;
|
||||
|
||||
if ($id) {
|
||||
$this->form->setExpense(ExpenseModel::findOrFail($id));
|
||||
$this->form->setExpense(ExpenseModel::byHashOrFail($id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null
|
||||
$this->modalTitle = $modalTitle;
|
||||
|
||||
if ($id) {
|
||||
$this->form->setCustomer(CustomerModel::findOrFail($id));
|
||||
$this->form->setCustomer(CustomerModel::byHashOrFail($id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ public function openModal(string $method, string $modalTitle, ?string $id = null
|
||||
$this->modalTitle = $modalTitle;
|
||||
|
||||
if ($id) {
|
||||
$this->form->setTier(TierModel::findOrFail($id));
|
||||
$this->form->setTier(TierModel::byHashOrFail($id));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -11,10 +11,11 @@
|
||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
use Spatie\Sluggable\HasSlug;
|
||||
use Spatie\Sluggable\SlugOptions;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Bottle extends Model implements HasMedia
|
||||
{
|
||||
use CascadeSoftDeletes, HasFactory, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
use CascadeSoftDeletes, HasFactory, HashableId, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -10,10 +10,11 @@
|
||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
use Spatie\Sluggable\HasSlug;
|
||||
use Spatie\Sluggable\SlugOptions;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Brand extends Model implements HasMedia
|
||||
{
|
||||
use HasFactory, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
use HasFactory, HashableId, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -9,10 +9,11 @@
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Spatie\Sluggable\HasSlug;
|
||||
use Spatie\Sluggable\SlugOptions;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Category extends Model
|
||||
{
|
||||
use CascadeSoftDeletes, HasFactory, HasSlug, SoftDeletes;
|
||||
use CascadeSoftDeletes, HasFactory, HashableId, HasSlug, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -7,10 +7,11 @@
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Customer extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
use HasFactory, HashableId, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -8,10 +8,11 @@
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Employee extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
use HasFactory, HashableId, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -7,10 +7,11 @@
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Expense extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
use HasFactory, HashableId, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -6,10 +6,11 @@
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Facility extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
use HasFactory, HashableId, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -4,9 +4,12 @@
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Membership extends Model
|
||||
{
|
||||
use HashableId;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected function casts(): array
|
||||
|
||||
@ -7,10 +7,11 @@
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class OpeningHour extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
use HasFactory, HashableId, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -13,10 +13,11 @@
|
||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
use Spatie\Sluggable\HasSlug;
|
||||
use Spatie\Sluggable\SlugOptions;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Outlet extends Model implements HasMedia
|
||||
{
|
||||
use CascadeSoftDeletes, HasFactory, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
use CascadeSoftDeletes, HasFactory, HashableId, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -12,10 +12,11 @@
|
||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
use Spatie\Sluggable\HasSlug;
|
||||
use Spatie\Sluggable\SlugOptions;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Perfume extends Model implements HasMedia
|
||||
{
|
||||
use HasFactory, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
use HasFactory, HashableId, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -10,10 +10,11 @@
|
||||
use Spatie\MediaLibrary\InteractsWithMedia;
|
||||
use Spatie\Sluggable\HasSlug;
|
||||
use Spatie\Sluggable\SlugOptions;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Product extends Model implements HasMedia
|
||||
{
|
||||
use HasFactory, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
use HasFactory, HashableId, HasSlug, InteractsWithMedia, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -7,10 +7,11 @@
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class ReferralCode extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
use HasFactory, HashableId, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -5,10 +5,11 @@
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class ReferralUsage extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
use HasFactory, HashableId;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -7,10 +7,11 @@
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasOne;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Tier extends Model
|
||||
{
|
||||
use CascadeSoftDeletes, HasFactory, SoftDeletes;
|
||||
use CascadeSoftDeletes, HasFactory, HashableId, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -14,10 +14,11 @@
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Spatie\Permission\Traits\HasRoles;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class User extends Authenticatable implements MustVerifyEmail
|
||||
{
|
||||
use CascadeSoftDeletes, HasFactory, HasRoles, Notifiable, SoftDeletes;
|
||||
use CascadeSoftDeletes, HasFactory, HashableId, HasRoles, Notifiable, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -8,10 +8,11 @@
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Veelasky\LaravelHashId\Eloquent\HashableId;
|
||||
|
||||
class Voucher extends Model
|
||||
{
|
||||
use HasFactory, SoftDeletes;
|
||||
use HasFactory, HashableId, SoftDeletes;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
"rappasoft/laravel-livewire-tables": "^3.7",
|
||||
"spatie/laravel-medialibrary": "^11.15",
|
||||
"spatie/laravel-permission": "^6.21",
|
||||
"spatie/laravel-sluggable": "^3.7"
|
||||
"spatie/laravel-sluggable": "^3.7",
|
||||
"veelasky/laravel-hashid": "^3.1"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
|
||||
139
composer.lock
generated
139
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "bc292bca89df03817c564af417271187",
|
||||
"content-hash": "d2c5ff203a0e5bd1b8d683556236ad97",
|
||||
"packages": [
|
||||
{
|
||||
"name": "archtechx/enums",
|
||||
@ -1677,6 +1677,75 @@
|
||||
],
|
||||
"time": "2025-08-22T14:27:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "hashids/hashids",
|
||||
"version": "5.0.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vinkla/hashids.git",
|
||||
"reference": "197171016b77ddf14e259e186559152eb3f8cf33"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vinkla/hashids/zipball/197171016b77ddf14e259e186559152eb3f8cf33",
|
||||
"reference": "197171016b77ddf14e259e186559152eb3f8cf33",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-mbstring": "*",
|
||||
"php": "^8.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^10.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-bcmath": "Required to use BC Math arbitrary precision mathematics (*).",
|
||||
"ext-gmp": "Required to use GNU multiple precision mathematics (*)."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Hashids\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Ivan Akimov",
|
||||
"email": "ivan@barreleye.com"
|
||||
},
|
||||
{
|
||||
"name": "Vincent Klaiber",
|
||||
"email": "hello@doubledip.se"
|
||||
}
|
||||
],
|
||||
"description": "Generate short, unique, non-sequential ids (like YouTube and Bitly) from numbers",
|
||||
"homepage": "https://hashids.org/php",
|
||||
"keywords": [
|
||||
"bitly",
|
||||
"decode",
|
||||
"encode",
|
||||
"hash",
|
||||
"hashid",
|
||||
"hashids",
|
||||
"ids",
|
||||
"obfuscate",
|
||||
"youtube"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/vinkla/hashids/issues",
|
||||
"source": "https://github.com/vinkla/hashids/tree/5.0.2"
|
||||
},
|
||||
"time": "2023-02-23T15:00:54+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel-lang/config",
|
||||
"version": "1.14.0",
|
||||
@ -7941,6 +8010,74 @@
|
||||
},
|
||||
"time": "2024-12-21T16:25:41+00:00"
|
||||
},
|
||||
{
|
||||
"name": "veelasky/laravel-hashid",
|
||||
"version": "v3.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/veelasky/laravel-hashid.git",
|
||||
"reference": "539597d535b01a8c95c47307ec6267865408eb46"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/veelasky/laravel-hashid/zipball/539597d535b01a8c95c47307ec6267865408eb46",
|
||||
"reference": "539597d535b01a8c95c47307ec6267865408eb46",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"hashids/hashids": "^4.0|^5.0",
|
||||
"illuminate/config": ">=6.18",
|
||||
"illuminate/contracts": ">=6.18",
|
||||
"illuminate/database": ">=6.18",
|
||||
"illuminate/support": ">=6.18",
|
||||
"illuminate/validation": ">=6.18",
|
||||
"php": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": ">=4.0",
|
||||
"phpunit/phpunit": ">=8.5",
|
||||
"roave/security-advisories": "dev-latest"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"aliases": {
|
||||
"HashId": "Veelasky\\LaravelHashId\\Facade"
|
||||
},
|
||||
"providers": [
|
||||
"Veelasky\\LaravelHashId\\HashIdServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Veelasky\\LaravelHashId\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Rifki Alhuraibi",
|
||||
"email": "veelasky@pm.com"
|
||||
}
|
||||
],
|
||||
"description": "HashId Implementation on Laravel Eloquent ORM",
|
||||
"keywords": [
|
||||
"eloquent",
|
||||
"hashid",
|
||||
"hashids",
|
||||
"laravel",
|
||||
"lumen"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/veelasky/laravel-hashid/issues",
|
||||
"source": "https://github.com/veelasky/laravel-hashid/tree/v3.1.4"
|
||||
},
|
||||
"time": "2023-10-03T07:32:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
"version": "v5.6.2",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user