28 lines
529 B
PHP
28 lines
529 B
PHP
<?php
|
|
|
|
namespace app\models;
|
|
use app\core\Model;
|
|
|
|
class ContactForm extends Model{
|
|
public string $subject = '';
|
|
public string $body = '';
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'subject' => [self::RULE_REQUIRED],
|
|
'body' => [self::RULE_REQUIRED]
|
|
];
|
|
}
|
|
|
|
public function labels(): array{
|
|
return [
|
|
'subject' => 'Enter your subject',
|
|
'body' => 'Enter the body'
|
|
];
|
|
}
|
|
|
|
public function send(){
|
|
return true;
|
|
}
|
|
} |