Dummy Members

This commit is contained in:
2022-05-26 16:43:59 +07:00
parent e8bb61be2f
commit 40d680287e
4 changed files with 190 additions and 27 deletions

View File

@@ -14,7 +14,25 @@ class MemberController extends Controller
*/
public function index()
{
//
$members = [];
$faker = \Faker\Factory::create();
for ($i = 0; $i < 10; $i++) {
$members[] = [
'id' => (10-$i),
'code' => 'UT0000'.sprintf("%02d", 10-$i),
'nik' => 'UNTR0000'.sprintf("%02d", $i),
'name' => $faker->name,
'plan_code' => collect(['PLAN001', 'PLAN002', 'PLAN003', 'PLAN004', 'PLAN005'])->random(),
'number_of_families' => random_int(2,4),
'number_of_claim' => random_int(0,2),
'active' => true,
'history' => []
];
}
return $members;
}
/**