This commit is contained in:
Graham Campbell
2014-12-20 21:20:17 +00:00
parent 26e4361d8a
commit 9d8d89248f
103 changed files with 2478 additions and 2353 deletions
+5 -3
View File
@@ -2,7 +2,8 @@
use Watson\Validating\ValidatingTrait;
class IncidentTemplate extends Eloquent {
class IncidentTemplate extends Eloquent
{
use ValidatingTrait;
protected $rules = [
@@ -19,10 +20,11 @@ class IncidentTemplate extends Eloquent {
* Overrides the models boot method.
* @return void
*/
public static function boot() {
public static function boot()
{
parent::boot();
self::saving(function($template) {
self::saving(function ($template) {
$template->slug = Str::slug($template->name);
});
}