add notification service

This commit is contained in:
2025-04-29 14:44:31 +03:30
parent 89fb72b3ce
commit 61d5b684a4
8 changed files with 181 additions and 18 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Models;
// use Illuminate\Contracts\Auth\MustVerifyEmail;
use App\Facades\File\FileFacade;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
@@ -14,5 +15,14 @@ class User extends Authenticatable
protected $guarded = [];
protected $hidden = ['password',];
protected $hidden = ['password'];
public function storeFile($file, $name)
{
if ($this->avatar) {
FileFacade::delete($this->avatar, true);
}
return FileFacade::save($file, 'users/avatars/' . $name);
}
}