-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from laravelcm/fix-bug-update-article
🐛 correction du bug lors de l'edition d'un article
- Loading branch information
Showing
1 changed file
with
0 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,10 @@ | |
use App\Models\Article; | ||
use App\Models\Tag; | ||
use App\Models\User; | ||
use App\Notifications\SendSubmittedArticle; | ||
use App\Traits\WithArticleAttributes; | ||
use App\Traits\WithTagsAssociation; | ||
use Illuminate\Support\Facades\Auth; | ||
use Illuminate\Support\Facades\Cache; | ||
use Illuminate\Support\Facades\Notification; | ||
use Livewire\Component; | ||
use Livewire\WithFileUploads; | ||
|
||
|
@@ -76,14 +74,6 @@ public function save() | |
$this->article->addMedia($this->file->getRealPath())->toMediaCollection('media'); | ||
} | ||
|
||
if (! $this->alreadySubmitted) { | ||
// Envoi du mail a l'admin pour la validation de l'article | ||
$admin = User::findByEmailAddress('[email protected]'); | ||
Notification::send($admin, new SendSubmittedArticle($this->article)); | ||
|
||
session()->flash('status', 'Merci d\'avoir soumis votre article. Vous aurez des nouvelles uniquement quand nous accepterons votre article.'); | ||
} | ||
|
||
Cache::forget('post-' . $this->article->id); | ||
|
||
$user->hasRole('user') ? | ||
|