I am trying to understand the usage and difference of boot and booted.
namespace App;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
protected static function boot() {
parent::boot();
static::creating(function ($user) {
});
}
protected static function booted() {
parent::booted();
static::creating(function ($user) {
});
}
}
When and where should be this two function called?