mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-28 02:50:39 +00:00
add for backend send shared link via email
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
namespace App;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use App\Notifications\SharedSendViaEmail;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
/**
|
||||
* App\Share
|
||||
@@ -37,6 +39,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
*/
|
||||
class Share extends Model
|
||||
{
|
||||
use Notifiable;
|
||||
|
||||
protected $guarded = ['id'];
|
||||
|
||||
protected $appends = ['link'];
|
||||
@@ -50,4 +54,15 @@ class Share extends Model
|
||||
|
||||
return url('/shared', ['token' => $this->attributes['token']]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the sahared link notification.
|
||||
*
|
||||
* @param string $token $emails
|
||||
* @return void
|
||||
*/
|
||||
public function sendSharedLinkViaEmail($emails, $token)
|
||||
{
|
||||
$this->notify(new SharedSendViaEmail($emails, $token));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user