Answer the question
In order to leave comments, you need to log in
How to correctly form slug in laravel 5.1?
I'm making a news module.
Three simple fields:
id (do not count)
title
slug
content The title is
clear... The
content is even clearer
But the notorious slug? How to generate it? I'm afraid that if I tell the customer - drive it in with your hands - v-raoine-proshel-subbotnik - they won't understand me very much ...
How is this even implemented?
In the helper I see a function - str_slug, but mentally I still don't understand where to fasten it.
I would be grateful for advice.
Answer the question
In order to leave comments, you need to log in
$slug = Str::slug($title);
chrishayes.ca/blog/code/laravel-4-generating-uniqu...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question