7 months ago

Laravel 6 and php 7.4 seeding problem

Posted 7 months ago by knubbe

I update to php 7.4 and in mine laravel 6 project when I seed a class I get this error:

ErrorException : implode(): Passing glue string after array is deprecated. Swap the parameters

This is my 'problematic' factory class:

$factory->define(Complaint::class, function (Faker $faker) {
    return [
        'date' => Carbon::parse($faker->dateTimeBetween('-5 years', 'now'))->format('d.m.Y'),
        'type_of_complaint_id' => TypeOfComplaint::inRandomOrder()->first()->id,
        'center_id' => Center::inRandomOrder()->first()->id,
        'complainant' => $faker->name,
        'description' => $faker->text(50),
        'created_by' => User::inRandomOrder()->first()->id,
        'updated_by' => User::inRandomOrder()->first()->id,

What could be a problem?

Please sign in or create an account to participate in this conversation.