Skip to content

Commit

Permalink
Merge branch 'master' into short-url-from-guest
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Apr 29, 2024
2 parents 6eaf87c + c0306b2 commit 7eab7d3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions app/Livewire/Table/AllUrlTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function datasource(): Builder
public function fields(): PowerGridFields
{
return PowerGrid::fields()
->add('user_name', function (Url $url) {
->add('author', function (Url $url) {
return '<span class="font-semibold">'.$url->author->name.'</span>';
})
->add('keyword', function (Url $url) {
Expand Down Expand Up @@ -105,7 +105,7 @@ class="btn btn-secondary btn-sm hover:text-red-600 active:text-red-700"
public function columns(): array
{
return [
Column::make('Owner', 'user_name', 'users.name')
Column::make('Owner', 'author')
->sortable()
->searchable(),

Expand All @@ -131,4 +131,11 @@ public function columns(): array
->bodyAttribute(styleAttr: ';padding-left: 8px'),
];
}

public function relationSearch(): array
{
return [
'author' => ['name'],
];
}
}
2 changes: 1 addition & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function signature(): string
if (auth()->check() === false) {
$dd = Helper::deviceDetector();

return hash('sha3-256', implode([
return hash('xxh3', implode([
'ip' => request()->ip(),
'browser' => $dd->getClient('name'),
'os' => $dd->getOs('name').$dd->getOs('version'),
Expand Down

0 comments on commit 7eab7d3

Please sign in to comment.