69 lines
1.5 KiB
PHP
69 lines
1.5 KiB
PHP
<?php
|
|
|
|
namespace App\Observers;
|
|
|
|
use Illuminate\Support\Facades\Cache;
|
|
use App\Models\ProfileCourtship;
|
|
use App\Models\User;
|
|
|
|
class ProfileCourtshipObserver
|
|
{
|
|
/**
|
|
* Handle the profile courtship "created" event.
|
|
*
|
|
* @param \App\profileCourtship $profileCourtship
|
|
* @return void
|
|
*/
|
|
public function created(profileCourtship $profileCourtship)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the profile courtship "updated" event.
|
|
*
|
|
* @param \App\profileCourtship $profileCourtship
|
|
* @return void
|
|
*/
|
|
public function updated(profileCourtship $profileCourtship)
|
|
{
|
|
$rd_user_key = User::cacheUserKey($profileCourtship->user_id);
|
|
if (Cache::has($rd_user_key)) {
|
|
Cache::forget($rd_user_key);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Handle the profile courtship "deleted" event.
|
|
*
|
|
* @param \App\profileCourtship $profileCourtship
|
|
* @return void
|
|
*/
|
|
public function deleted(profileCourtship $profileCourtship)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the profile courtship "restored" event.
|
|
*
|
|
* @param \App\profileCourtship $profileCourtship
|
|
* @return void
|
|
*/
|
|
public function restored(profileCourtship $profileCourtship)
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Handle the profile courtship "force deleted" event.
|
|
*
|
|
* @param \App\profileCourtship $profileCourtship
|
|
* @return void
|
|
*/
|
|
public function forceDeleted(profileCourtship $profileCourtship)
|
|
{
|
|
//
|
|
}
|
|
}
|