Skip to content

Instantly share code, notes, and snippets.

@Faizanq
Last active July 27, 2022 06:25
Show Gist options
  • Save Faizanq/31c94afacc233a901b0d7522448fff69 to your computer and use it in GitHub Desktop.
Save Faizanq/31c94afacc233a901b0d7522448fff69 to your computer and use it in GitHub Desktop.
<?php
namespace App\Models;
use App\Observers\CustomerObserver;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Customer extends Model
{
use HasFactory, SoftDeletes;
protected static function boot()
{
parent::boot();
static ::observe(CustomerObserver::class);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment