Laravel Fluent Str – 48 Methods [? 10 MINUTES!]

.ltag__user__id__386677 .follow-action-button {
background-color: #339d15 !important;
color: #ffffff !important;
border-color: #339d15 !important;
}

Clean Code StudioFollow


This content originally appeared on DEV Community and was authored by Clean Code Studio

.ltag__user__id__386677 .follow-action-button { background-color: #339d15 !important; color: #ffffff !important; border-color: #339d15 !important; }
cleancodestudio image

Did you know I have a newsletter? ?

If you want to get notified when I publish new blog posts or make major project announcements, head over to https://cleancodestudio.paperform.co/

? 10 MINUTES. EVERY LARAVEL FLUENT STRING METHOD (THATS 48 METHODS!)

It's nice when your developer experience, and over all work flow convenience, is improved with features purely meant to make your life better. With Laravel 7's New Fluent String Feature, you can access almost every single Str facade method - fluently!

Upper

Str::of('hello world')->upper();

// HELLO WORLD

Camel

Str::of('HELLO WORLD')->camel();

// HelloWorld

Lower

Str::of('HelloWorld')->lower();

// helloworld

Kebab

Str::of('hello world')->kebab();

// hello-world

Title

Str::of('hello-world')->title();

// Hello World

Snake

Str::of('Hello World')->snake();

// hello_world

Studly

Str::of('hello_world')->studly();

// HelloWorld

ucfirst

Str::of('hello world')->ucfirst();

// Hello world

Plural

Str::of('hello world')->plural();

// hello worlds

Singular

Str::of('hello worlds')->singular();

// hello world

Slug

Str::of('hello world')->slug();

// hello-world

Exactly

is

isNotEmpty

isEmpty

whenEmpty

startsWith

endsWith

contains

containsAll

substr

before

rtrim

after

ltrim

beforeLast

trim

afterLast

dirName

basename

replace

replaceArray

replaceLast

replaceFirst

replaceMatches

finish

start

append

prepend

isAscii

ascii

explode

length

limit

words

split

match

matchAll

Clean Code
Clean Code Studio

.ltag__user__id__386677 .follow-action-button { background-color: #339d15 !important; color: #ffffff !important; border-color: #339d15 !important; }
cleancodestudio image

Did you know I have a newsletter? ?

If you want to get notified when I publish new blog posts or make major project announcements, head over to https://cleancodestudio.paperform.co/


This content originally appeared on DEV Community and was authored by Clean Code Studio


Print Share Comment Cite Upload Translate Updates
APA

Clean Code Studio | Sciencx (2021-07-28T04:38:14+00:00) Laravel Fluent Str – 48 Methods [? 10 MINUTES!]. Retrieved from https://www.scien.cx/2021/07/28/laravel-fluent-str-48-methods-%f0%9f%9a%80-10-minutes/

MLA
" » Laravel Fluent Str – 48 Methods [? 10 MINUTES!]." Clean Code Studio | Sciencx - Wednesday July 28, 2021, https://www.scien.cx/2021/07/28/laravel-fluent-str-48-methods-%f0%9f%9a%80-10-minutes/
HARVARD
Clean Code Studio | Sciencx Wednesday July 28, 2021 » Laravel Fluent Str – 48 Methods [? 10 MINUTES!]., viewed ,<https://www.scien.cx/2021/07/28/laravel-fluent-str-48-methods-%f0%9f%9a%80-10-minutes/>
VANCOUVER
Clean Code Studio | Sciencx - » Laravel Fluent Str – 48 Methods [? 10 MINUTES!]. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/07/28/laravel-fluent-str-48-methods-%f0%9f%9a%80-10-minutes/
CHICAGO
" » Laravel Fluent Str – 48 Methods [? 10 MINUTES!]." Clean Code Studio | Sciencx - Accessed . https://www.scien.cx/2021/07/28/laravel-fluent-str-48-methods-%f0%9f%9a%80-10-minutes/
IEEE
" » Laravel Fluent Str – 48 Methods [? 10 MINUTES!]." Clean Code Studio | Sciencx [Online]. Available: https://www.scien.cx/2021/07/28/laravel-fluent-str-48-methods-%f0%9f%9a%80-10-minutes/. [Accessed: ]
rf:citation
» Laravel Fluent Str – 48 Methods [? 10 MINUTES!] | Clean Code Studio | Sciencx | https://www.scien.cx/2021/07/28/laravel-fluent-str-48-methods-%f0%9f%9a%80-10-minutes/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.