helper
This commit is contained in:
parent
ffc583c34d
commit
cc04582259
@ -3,6 +3,7 @@
|
|||||||
use App\Models\Study;
|
use App\Models\Study;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Services\AuditTrail\ActivityLogger;
|
use App\Services\AuditTrail\ActivityLogger;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
use Spatie\MediaLibrary\MediaCollections\Models\Media;
|
||||||
|
|
||||||
if (! function_exists('_h')) {
|
if (! function_exists('_h')) {
|
||||||
@ -128,3 +129,14 @@ function me(User|int|null $user = null): User
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! function_exists('formatTitle')) {
|
||||||
|
function formatTitle(string $str): string
|
||||||
|
{
|
||||||
|
return Str::of($str)
|
||||||
|
->slug()
|
||||||
|
->replace('-', ' ')
|
||||||
|
->title()
|
||||||
|
->toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user