first real commit in standalone repo

This commit is contained in:
2025-01-09 23:47:18 -08:00
parent 0e8844f47e
commit 9e6ce06a24
30 changed files with 1741 additions and 1 deletions

View File

@@ -0,0 +1,61 @@
<?php
declare(strict_types=1);
use Migrations\AbstractMigration;
class CreateContactUsFormSubmissions extends AbstractMigration
{
/**
* Change Method.
*
* More information on this method is available here:
* https://book.cakephp.org/phinx/0/en/migrations.html#the-change-method
* @return void
*/
public function change(): void
{
$table = $this->table('contact_us_form_submissions', ['id' => false, 'primary_key' => ['id']]);
$table->addColumn('id', 'uuid', [
'default' => null,
'null' => false,
]);
$table->addColumn('submitted_at', 'datetime', [
'default' => null,
'null' => false,
]);
$table->addColumn('client_ip', 'string', [
'default' => null,
'limit' => 45,
'null' => false,
]);
$table->addColumn('name', 'string', [
'default' => null,
'limit' => 255,
'null' => false,
]);
$table->addColumn('email', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
]);
$table->addColumn('subject', 'string', [
'default' => null,
'limit' => 255,
'null' => true,
]);
$table->addColumn('message', 'text', [
'default' => null,
'null' => false,
]);
$table->addColumn('confirm_email_sent', 'datetime', [
'default' => null,
'null' => true,
]);
$table->addColumn('backend_email_sent', 'datetime', [
'default' => null,
'null' => true,
]);
$table->create();
}
}

31
config/app.example.php Normal file
View File

@@ -0,0 +1,31 @@
<?php
// The following configs can be globally configured, copy the array content over to your ROOT/config
return [
'ContactUs' => [
'fields' => [
'subject' => true,
'email' => true,
'captcha' => true,
],
'sendConfirmationEmail' => true,
'sendBackendEmail' => true,
'email' => [
'mailerClass' => 'CakeContactUs.ContactUsFormSubmissions',
'confirmation' => [
'enabled' => true,
],
'backend' => [
'enabled' => true,
'to' => 'bshipley@hipowered.dev',
],
],
'addIdToRedirect' => true,
'redirectUrl' => [
'prefix' => 'Admin',
'plugin' => 'CakeContactUs',
'controller' => 'ContactUsFormSubmissions',
'action' => 'view',
],
],
];