| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 14 | 
| Code Lines | 6 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 30 | protected static function boot()  | 
            ||
| 31 |     { | 
            ||
| 32 | parent::boot();  | 
            ||
| 33 | |||
| 34 | // Generated the slug before updating.  | 
            ||
| 35 |         static::updating(function ($model) { | 
            ||
| 36 | $model->setSlugAttribute($model->name);  | 
            ||
| 37 | });  | 
            ||
| 38 | |||
| 39 | // Generated the slug before creating.  | 
            ||
| 40 |         static::creating(function ($model) { | 
            ||
| 41 | $model->setSlugAttribute($model->name);  | 
            ||
| 42 | });  | 
            ||
| 43 | }  | 
            ||
| 44 | }  | 
            ||
| 45 |