Skip to content

Commit 8cb8f11

Browse files
committed
Use deprecation over breaking
1 parent f7eafda commit 8cb8f11

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

init/functions.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -849,3 +849,23 @@ function link_to_action($action, $title = null, $parameters = [], $attributes =
849849
return app('html')->linkAction($action, $title, $parameters, $attributes);
850850
}
851851
}
852+
853+
if (!function_exists('starts_with')) {
854+
/**
855+
* @deprecated use str_starts_with
856+
*/
857+
function starts_with($haystack, $needles)
858+
{
859+
return Str::startsWith($haystack, $needles);
860+
}
861+
}
862+
863+
if (!function_exists('ends_with')) {
864+
/**
865+
* @deprecated use str_ends_with
866+
*/
867+
function ends_with($haystack, $needles)
868+
{
869+
return Str::endsWith($haystack, $needles);
870+
}
871+
}

0 commit comments

Comments
 (0)