this repo has no description
at master 37 lines 884 B view raw
1<?php 2 3namespace Database\Factories; 4 5use Illuminate\Database\Eloquent\Factories\Factory; 6use Illuminate\Support\Str; 7 8/** 9 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Institution> 10 */ 11class InstitutionFactory extends Factory 12{ 13 /** 14 * Define the model's default state. 15 * 16 * @return array<string, mixed> 17 */ 18 public function definition(): array 19 { 20 $name = fake()->name(); 21 $slug = Str::replace(" ", "-", $name); 22 $slug = Str::lower($slug); 23 return [ 24 "name" => $name, 25 "slug" => $slug, 26 "type" => fake()->randomElement([ 27 "bank", 28 "card", 29 "broker", 30 "crypto_exchange", 31 "wallet", 32 "other", 33 ]), 34 "country_code" => fake()->countryCode(), 35 ]; 36 } 37}