state(function (array $attributes) use ($workspace) { return [ 'workspace_id' => $workspace->id, ]; }); } public function forDatabase(string $databaseId) { return $this->state(function (array $attributes) use ($databaseId) { return [ 'database_id' => $databaseId, ]; }); } public function withProperties(array $properties) { return $this->state(function (array $attributes) use ($properties) { return [ 'properties' => $properties, ]; }); } public function createdBy(User $user) { return $this->state(function (array $attributes) use ($user) { return [ 'creator_id' => $user->id, ]; }); } /** * Define the model's default state. * * @return array */ public function definition() { return [ 'title' => $this->faker->text(30), 'description' => $this->faker->randomHtml(1), 'visibility' => 'public', 'notifies' => false, 'send_submission_confirmation' => false, 'webhook_url' => null, 'theme' => $this->faker->randomElement(Form::THEMES), 'width' => $this->faker->randomElement(Form::WIDTHS), 'dark_mode' => $this->faker->randomElement(Form::DARK_MODE_VALUES), 'color' => '#3B82F6', 'hide_title' => false, 'no_branding' => false, 'uppercase_labels' => true, 'transparent_background' => false, 'submit_button_text' => 'Submit', 'editable_submissions' => false, 're_fillable' => false, 're_fill_button_text' => 'Fill Again', 'submitted_text' => '
Amazing, we saved your answers. Thank you for your time and have a great day!
', 'notification_sender' => 'OpenForm', 'notification_subject' => 'We saved your answers', 'notification_body' => 'Hello there 👋