Club System
This commit is contained in:
21
app/Helpers/HashesHelpers.php
Normal file
21
app/Helpers/HashesHelpers.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use stdClass;
|
||||
|
||||
class HashesHelpers
|
||||
{
|
||||
|
||||
public static function findHashes(string $sha1 ): ?StdClass
|
||||
{
|
||||
return DB::connection('hashes')->table('hashes')->where('sha1', $sha1)->first();
|
||||
}
|
||||
|
||||
public static function getReferenceName( int $id ): ?string
|
||||
{
|
||||
return DB::connection('hashes')->table('dat_reference')->where('id', $id)->first()?->name ?? null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user