diff --git a/resources/views/admin/apps/home.blade.php b/resources/views/admin/apps/home.blade.php
index aa8dfc0f2..44703aad0 100644
--- a/resources/views/admin/apps/home.blade.php
+++ b/resources/views/admin/apps/home.blade.php
@@ -39,7 +39,7 @@
{{$app->user->username}} |
{{$app->name}} |
- {{str_limit($app->redirect, 30)}} |
+ {{Str::limit($app->redirect, 30)}} |
{{$app->revoked ? 'true' : 'false'}} |
{{now()->parse($app->created_at)->diffForHumans()}} |
diff --git a/resources/views/admin/curated-register/index.blade.php b/resources/views/admin/curated-register/index.blade.php
index 8e18395d3..f049b3781 100644
--- a/resources/views/admin/curated-register/index.blade.php
+++ b/resources/views/admin/curated-register/index.blade.php
@@ -81,11 +81,11 @@
@endif
- {{ str_limit($record->reason_to_join, 100) }}
+ {{ Str::limit($record->reason_to_join, 100) }}
|
- {{ str_limit(\Illuminate\Support\Str::mask($record->email, '*', 5, 10), 10) }}
+ {{ Str::limit(\Illuminate\Support\Str::mask($record->email, '*', 5, 10), 10) }}
|
{{ $record->created_at->diffForHumans() }} |
diff --git a/resources/views/admin/curated-register/templates.blade.php b/resources/views/admin/curated-register/templates.blade.php
index 17b10da80..85fa821e4 100644
--- a/resources/views/admin/curated-register/templates.blade.php
+++ b/resources/views/admin/curated-register/templates.blade.php
@@ -65,7 +65,7 @@
{{ $template->name }}
- {{ str_limit($template->content, 80) }}
+ {{ Str::limit($template->content, 80) }}
|
{{ $template->is_active ? '✅' : '❌' }}
diff --git a/resources/views/admin/messages/home.blade.php b/resources/views/admin/messages/home.blade.php
index 1a9c2c3bc..629efc610 100644
--- a/resources/views/admin/messages/home.blade.php
+++ b/resources/views/admin/messages/home.blade.php
@@ -65,7 +65,7 @@
|
{{$msg->user->username}} |
- {{str_limit($msg->message, 40)}} |
+ {{Str::limit($msg->message, 40)}} |
{{$msg->created_at->diffForHumans()}} |
@endforeach
diff --git a/resources/views/admin/newsroom/home.blade.php b/resources/views/admin/newsroom/home.blade.php
index ce557a9be..477fdfaee 100644
--- a/resources/views/admin/newsroom/home.blade.php
+++ b/resources/views/admin/newsroom/home.blade.php
@@ -47,8 +47,8 @@
- {{str_limit($news->title, 50)}}
- {{-- {{str_limit($news->summary, 80)}} --}}
+ {{Str::limit($news->title, 50)}}
+ {{-- {{Str::limit($news->summary, 80)}} --}}
|
diff --git a/resources/views/admin/users/home.blade.php b/resources/views/admin/users/home.blade.php
index 3cc475410..44e696132 100644
--- a/resources/views/admin/users/home.blade.php
+++ b/resources/views/admin/users/home.blade.php
@@ -211,7 +211,7 @@
- {{ str_limit(strip_tags($user->profile->bio))}}
+ {{ Str::limit(strip_tags($user->profile->bio))}}
{{ parse_url($user->profile->website, PHP_URL_HOST) }}
diff --git a/resources/views/auth/curated-register/partials/step-1.blade.php b/resources/views/auth/curated-register/partials/step-1.blade.php
index 112fb6e96..cf6d29aa9 100644
--- a/resources/views/auth/curated-register/partials/step-1.blade.php
+++ b/resources/views/auth/curated-register/partials/step-1.blade.php
@@ -1,5 +1,5 @@
@php
-$id = str_random(14);
+$id = Str::random(14);
@endphp
Before you continue.
@if(config_cache('app.rules') && strlen(config_cache('app.rules')) > 5)
diff --git a/resources/views/components/collapse.blade.php b/resources/views/components/collapse.blade.php
index 144579366..f803300d6 100644
--- a/resources/views/components/collapse.blade.php
+++ b/resources/views/components/collapse.blade.php
@@ -1,5 +1,5 @@
@php
-$cid = 'col' . str_random(6);
+$cid = 'col' . Str::random(6);
@endphp
diff --git a/resources/views/emails/contact/admin-response.blade.php b/resources/views/emails/contact/admin-response.blade.php
index d04d3218a..3c90dc5d0 100644
--- a/resources/views/emails/contact/admin-response.blade.php
+++ b/resources/views/emails/contact/admin-response.blade.php
@@ -4,7 +4,7 @@ Hello **@{{$contact->user->username}}**,
You contacted the admin team of {{config('pixelfed.domain.app')}} with the following inquiry:
-{{str_limit($contact->message, 80)}}
+{{Str::limit($contact->message, 80)}}
diff --git a/resources/views/emails/curated-register/admin_notify.blade.php b/resources/views/emails/curated-register/admin_notify.blade.php
index 72e7e082b..15090cc43 100644
--- a/resources/views/emails/curated-register/admin_notify.blade.php
+++ b/resources/views/emails/curated-register/admin_notify.blade.php
@@ -19,7 +19,7 @@ Email: {{ $verify->email }}
*The user provided the following reason to join:*
-{!!str_limit(nl2br($verify->reason_to_join), 300)!!}
+{!!Str::limit(nl2br($verify->reason_to_join), 300)!!}
diff --git a/resources/views/settings/parental-controls/checkbox.blade.php b/resources/views/settings/parental-controls/checkbox.blade.php
index b6cedbe92..5d09e18a0 100644
--- a/resources/views/settings/parental-controls/checkbox.blade.php
+++ b/resources/views/settings/parental-controls/checkbox.blade.php
@@ -1,5 +1,5 @@
@php
-$id = str_random(6) . '_' . str_slug($name);
+$id = Str::random(6) . '_' . Str::slug($name);
$defaultChecked = isset($checked) && $checked ? 'checked=""' : '';
@endphp
diff --git a/tests/Feature/RemoteOidcTest.php b/tests/Feature/RemoteOidcTest.php
index 0c197e709..a4f13ce12 100644
--- a/tests/Feature/RemoteOidcTest.php
+++ b/tests/Feature/RemoteOidcTest.php
@@ -6,6 +6,7 @@ use App\Models\UserOidcMapping;
use App\Services\UserOidcService;
use App\User;
use Auth;
+use Illuminate\Support\Str;
use League\OAuth2\Client\Provider\GenericResourceOwner;
use League\OAuth2\Client\Token\AccessToken;
use Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration;
@@ -42,7 +43,7 @@ class RemoteOidcTest extends TestCase
config(['remote-auth.oidc.enabled' => true]);
$oauthData = [
- 'sub' => str_random(10),
+ 'sub' => Str::random(10),
'preferred_username' => fake()->unique()->userName,
'email' => fake()->unique()->freeEmail,
];
@@ -83,7 +84,7 @@ class RemoteOidcTest extends TestCase
config(['remote-auth.oidc.enabled' => true]);
$oauthData = [
- 'sub' => str_random(10),
+ 'sub' => Str::random(10),
'preferred_username' => $user->username,
'email' => $user->email,
];
|