Support the ongoing development of →
Database Blade Authentication
Last updated 2 years ago.

There are a number of ways to achieve that functionality and I will list them below: Use the $faker->sentence() method to generate a title, and substr to remove the period at the end of the sentence. Solution link

$title = substr($this->faker->sentence(2), 0, -1);

Secondly, use can use rtrim to remove the . at the end of the sentence. Solution link

$title = rtrim($this->faker->sentence(2), '.');
Solution selected by @ajax30

@ajax30 I think you already fixed this issue, right ?


Sign in to participate in this thread!


Your banner here too?

Razvan ajax30 Joined 2 Oct 2021


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.