add notification service
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user