mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-04 01:09:58 -05:00
Apply fixes from StyleCI
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
* NOTICE OF LICENSE.
|
||||
*
|
||||
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
|
||||
* The details is bundled with this project in the file LICENSE.txt.
|
||||
*
|
||||
* @project UNIT3D
|
||||
*
|
||||
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
|
||||
* @author HDVinnie
|
||||
*/
|
||||
@@ -24,7 +25,7 @@ class SubscriptionController extends Controller
|
||||
private $toastr;
|
||||
|
||||
/**
|
||||
* SubscriptionController Constructor
|
||||
* SubscriptionController Constructor.
|
||||
*
|
||||
* @param Toastr $toastr
|
||||
*/
|
||||
@@ -34,9 +35,10 @@ class SubscriptionController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Subscribe To A Topic
|
||||
* Subscribe To A Topic.
|
||||
*
|
||||
* @param Topic $topic
|
||||
*
|
||||
* @return Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function subscribe(Topic $topic)
|
||||
@@ -48,7 +50,7 @@ class SubscriptionController extends Controller
|
||||
$subscription->save();
|
||||
|
||||
return redirect()->route('forum_topic', ['slug' => $topic->slug, 'id' => $topic->id])
|
||||
->with($this->toastr->success('You are now subscribed to topic, ' . $topic->name . '. You will now receive site notifications when a reply is left.', 'Yay!', ['options']));
|
||||
->with($this->toastr->success('You are now subscribed to topic, '.$topic->name.'. You will now receive site notifications when a reply is left.', 'Yay!', ['options']));
|
||||
} else {
|
||||
return redirect()->route('forum_topic', ['slug' => $topic->slug, 'id' => $topic->id])
|
||||
->with($this->toastr->error('You are already subscribed to this topic', 'Whoops!', ['options']));
|
||||
@@ -56,9 +58,10 @@ class SubscriptionController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsubscribe To A Topic
|
||||
* Unsubscribe To A Topic.
|
||||
*
|
||||
* @param Topic $topic
|
||||
*
|
||||
* @return Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function unsubscribe(Topic $topic)
|
||||
@@ -68,7 +71,7 @@ class SubscriptionController extends Controller
|
||||
$subscription->delete();
|
||||
|
||||
return redirect()->route('forum_topic', ['slug' => $topic->slug, 'id' => $topic->id])
|
||||
->with($this->toastr->info('You are no longer subscribed to topic, ' . $topic->name. '. You will no longer receive site notifications when a reply is left.', 'Yay!', ['options']));
|
||||
->with($this->toastr->info('You are no longer subscribed to topic, '.$topic->name.'. You will no longer receive site notifications when a reply is left.', 'Yay!', ['options']));
|
||||
} else {
|
||||
return redirect()->route('forum_topic', ['slug' => $topic->slug, 'id' => $topic->id])
|
||||
->with($this->toastr->error('You are not subscribed this topic to begin with...', 'Whoops!', ['options']));
|
||||
|
||||
Reference in New Issue
Block a user