Skip to content

Instantly share code, notes, and snippets.

@mprince2k18
Last active March 21, 2024 04:41
Show Gist options
  • Save mprince2k18/3fb74d2e88e2f58b6d934b4a70eaf335 to your computer and use it in GitHub Desktop.
Save mprince2k18/3fb74d2e88e2f58b6d934b4a70eaf335 to your computer and use it in GitHub Desktop.
ModelParsingService
<?php
namespace App\Services;
class ModelParsingService
{
public function parseModelTuple($response, $value)
{
return array_slice(is_array($value) ? $value : (array)$value, 0, 4) + array_fill(0, 4, null);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment