mirror of https://github.com/pixelfed/pixelfed
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
76 lines
1.3 KiB
PHTML
76 lines
1.3 KiB
PHTML
6 years ago
|
<?php
|
||
|
|
||
|
namespace App\Observers;
|
||
|
|
||
|
use App\Avatar;
|
||
|
|
||
|
class AvatarObserver
|
||
|
{
|
||
|
/**
|
||
|
* Handle the avatar "created" event.
|
||
|
*
|
||
|
* @param \App\Avatar $avatar
|
||
|
* @return void
|
||
|
*/
|
||
|
public function created(Avatar $avatar)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the avatar "updated" event.
|
||
|
*
|
||
|
* @param \App\Avatar $avatar
|
||
|
* @return void
|
||
|
*/
|
||
|
public function updated(Avatar $avatar)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the avatar "deleted" event.
|
||
|
*
|
||
|
* @param \App\Avatar $avatar
|
||
|
* @return void
|
||
|
*/
|
||
|
public function deleted(Avatar $avatar)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the avatar "deleting" event.
|
||
|
*
|
||
|
* @param \App\Avatar $avatar
|
||
|
* @return void
|
||
|
*/
|
||
|
public function deleting(Avatar $avatar)
|
||
|
{
|
||
|
$path = storage_path('app/'.$avatar->media_path);
|
||
|
@unlink($path);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the avatar "restored" event.
|
||
|
*
|
||
|
* @param \App\Avatar $avatar
|
||
|
* @return void
|
||
|
*/
|
||
|
public function restored(Avatar $avatar)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Handle the avatar "force deleted" event.
|
||
|
*
|
||
|
* @param \App\Avatar $avatar
|
||
|
* @return void
|
||
|
*/
|
||
|
public function forceDeleted(Avatar $avatar)
|
||
|
{
|
||
|
//
|
||
|
}
|
||
|
}
|