<?php namespace App\ModelObservers; use App\Label; class LabelObserver { public function creating(Label $label) { $label->generateAlias(); } }