winter/modules/system/models/EmailLayout.php
Sam Georges 2b820a20d6 Convert all boolean table columnns to use is_ prefix
Add email template/layout system
2014-06-06 21:39:20 +10:00

25 lines
614 B
PHP

<?php namespace System\Models;
use Model;
use System\Classes\ApplicationException;
class EmailLayout extends Model
{
/**
* @var string The database table used by the model.
*/
protected $table = 'system_email_layouts';
public $rules = [
'code' => 'required|unique:system_email_layouts',
'name' => 'required',
'content_html' => 'required',
];
public function beforeDelete()
{
if ($this->is_locked)
throw new ApplicationException('Cannot delete this template because it is locked');
}
}