Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x] Add classBasename() method to Stringable #35219

Merged
merged 2 commits into from Nov 13, 2020
Merged

[8.x] Add classBasename() method to Stringable #35219

merged 2 commits into from Nov 13, 2020

Conversation

jameslkingsley
Copy link
Contributor

This PR adds a method for the class_basename function to the Stringable class.

// This to me feels clear and concise
Str::of(static::class)
    ->classBasename()
    ->kebab();

// Instead of the verbose
Str::of(static::class)
    ->afterLast('\\')
    ->kebab();

@taylorotwell taylorotwell merged commit c6c67bd into laravel:8.x Nov 13, 2020
@jameslkingsley jameslkingsley deleted the stringable-class-basename branch November 13, 2020 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants