laravel faker value or null code example Example: laravel faker value or null 'parent_id' => $faker->boolean ? Page::all()->random()->id : null,