Support the ongoing development of Laravel.io →
Database Blade Authentication
Last updated 2 years ago.
0
Solution

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!

Eventy

Your banner here too?

Razvan ajax30 Joined 2 Oct 2021

Moderators

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

Your logo here?

Laravel.io

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

© 2024 Laravel.io - All rights reserved.