Support the ongoing development of Laravel.io →
Database Blade Authentication
Last updated 3 months ago.
0

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), '.');
0
Solution selected by @ajax30

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

0

Sign in to participate in this thread!

LoadForge

Your banner here too?

Razvan Razvan ajax30 Joined 2 Oct 2021

Moderators

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.

© 2022 Laravel.io - All rights reserved.