diff --git a/app/Http/Controllers/LikeController.php b/app/Http/Controllers/LikeController.php index 0f17234ec..46d35dabe 100644 --- a/app/Http/Controllers/LikeController.php +++ b/app/Http/Controllers/LikeController.php @@ -30,7 +30,7 @@ class LikeController extends Controller public function store(Request $request, $postId) { $post = Post::findOrFail($postId); - $postUrl = "forums/topic/{$post->topic->id}?page={$post->getPageNumber()}#post-{$postId}"; + $postUrl = "forums/topics/{$post->topic->id}?page={$post->getPageNumber()}#post-{$postId}"; $user = $request->user(); $like = $user->likes()->where('post_id', '=', $post->id)->where('like', '=', 1)->first(); @@ -65,7 +65,7 @@ class LikeController extends Controller public function destroy(Request $request, $postId) { $post = Post::findOrFail($postId); - $postUrl = "forums/topic/{$post->topic->id}?page={$post->getPageNumber()}#post-{$postId}"; + $postUrl = "forums/topics/{$post->topic->id}?page={$post->getPageNumber()}#post-{$postId}"; $user = $request->user(); $like = $user->likes()->where('post_id', '=', $post->id)->where('like', '=', 1)->first(); diff --git a/app/Http/Controllers/PostController.php b/app/Http/Controllers/PostController.php index 7c5db7e97..d274fafb9 100644 --- a/app/Http/Controllers/PostController.php +++ b/app/Http/Controllers/PostController.php @@ -15,6 +15,8 @@ namespace App\Http\Controllers; use App\Models\Post; use App\Models\Topic; +use App\Repositories\ChatRepository; +use App\Repositories\TaggedUserRepository; use Illuminate\Http\Request; use App\Achievements\UserMade25Posts; use App\Achievements\UserMade50Posts; @@ -31,6 +33,28 @@ use App\Achievements\UserMadeFirstPost; class PostController extends Controller { + /** + * @var TaggedUserRepository + */ + private $tag; + + /** + * @var ChatRepository + */ + private $chat; + + /** + * ForumController Constructor. + * + * @param TaggedUserRepository $tag + * @param ChatRepository $chat + */ + public function __construct(TaggedUserRepository $tag, ChatRepository $chat) + { + $this->tag = $tag; + $this->chat = $chat; + } + /** * Add A Post To A Topic. * @@ -70,7 +94,7 @@ class PostController extends Controller $post->save(); $appurl = config('app.url'); - $href = "{$appurl}/forums/topic/{$topic->slug}.{$topic->id}?page={$post->getPageNumber()}#post-{$post->id}"; + $href = "{$appurl}/forums/topics/{$topic->id}?page={$post->getPageNumber()}#post-{$post->id}"; $message = "{$user->username} has tagged you in a forum post. You can view it [url=$href] HERE [/url]"; if ($this->tag->hasTags($request->input('content'))) { @@ -131,8 +155,8 @@ class PostController extends Controller // Post To Chatbox $appurl = config('app.url'); - $postUrl = "{$appurl}/forums/topic/{$topic->slug}.{$topic->id}?page={$post->getPageNumber()}#post-{$post->id}"; - $realUrl = "/forums/topic/{$topic->slug}.{$topic->id}?page={$post->getPageNumber()}#post-{$post->id}"; + $postUrl = "{$appurl}/forums/topics/{$topic->id}?page={$post->getPageNumber()}#post-{$post->id}"; + $realUrl = "/forums/topics/{$topic->id}?page={$post->getPageNumber()}#post-{$post->id}"; $profileUrl = "{$appurl}/{$user->username}.{$user->id}"; $this->chat->systemMessage("[url=$profileUrl]{$user->username}[/url] has left a reply on topic [url={$postUrl}]{$topic->name}[/url]"); @@ -196,7 +220,7 @@ class PostController extends Controller { $user = $request->user(); $post = Post::findOrFail($postId); - $postUrl = "forums/topic/{$post->topic->slug}.{$post->topic->id}?page={$post->getPageNumber()}#post-{$postId}"; + $postUrl = "forums/topics/{$post->topic->id}?page={$post->getPageNumber()}#post-{$postId}"; abort_unless($user->group->is_modo || $user->id === $post->user_id, 403); $post->content = $request->input('content'); diff --git a/app/Http/Controllers/Staff/MassActionController.php b/app/Http/Controllers/Staff/MassActionController.php index d8f28da41..72b9e36f6 100644 --- a/app/Http/Controllers/Staff/MassActionController.php +++ b/app/Http/Controllers/Staff/MassActionController.php @@ -12,39 +12,15 @@ */ namespace App\Http\Controllers\Staff; - -use App\Jobs\ProcessMassPM; +; use App\Models\User; use App\Models\Group; +use App\Jobs\ProcessMassPM; +use Illuminate\Http\Request; +use App\Http\Controllers\Controller; class MassActionController extends Controller { - /** - * Mass Validate Unvalidated Users. - * - * @return Illuminate\Http\RedirectResponse - */ - public function validate() - { - $validatingGroup = Group::select(['id'])->where('slug', '=', 'validating')->first(); - $memberGroup = Group::select(['id'])->where('slug', '=', 'user')->first(); - $users = User::where('active', '=', 0)->where('group_id', '=', $validatingGroup->id)->get(); - - foreach ($users as $user) { - $user->group_id = $memberGroup->id; - $user->active = 1; - $user->can_upload = 1; - $user->can_download = 1; - $user->can_request = 1; - $user->can_comment = 1; - $user->can_invite = 1; - $user->save(); - } - - return redirect()->route('staff.dashboard.index') - ->withSuccess('Unvalidated Accounts Are Now Validated'); - } - /** * Mass PM Form. * @@ -91,4 +67,30 @@ class MassActionController extends Controller ->withSuccess('MassPM Sent'); } } + + /** + * Mass Validate Unvalidated Users. + * + * @return Illuminate\Http\RedirectResponse + */ + public function update() + { + $validatingGroup = Group::select(['id'])->where('slug', '=', 'validating')->first(); + $memberGroup = Group::select(['id'])->where('slug', '=', 'user')->first(); + $users = User::where('active', '=', 0)->where('group_id', '=', $validatingGroup->id)->get(); + + foreach ($users as $user) { + $user->group_id = $memberGroup->id; + $user->active = 1; + $user->can_upload = 1; + $user->can_download = 1; + $user->can_request = 1; + $user->can_comment = 1; + $user->can_invite = 1; + $user->save(); + } + + return redirect()->route('staff.dashboard.index') + ->withSuccess('Unvalidated Accounts Are Now Validated'); + } } diff --git a/app/Http/Controllers/TopicController.php b/app/Http/Controllers/TopicController.php index ccdbf8708..1a8a8a459 100644 --- a/app/Http/Controllers/TopicController.php +++ b/app/Http/Controllers/TopicController.php @@ -16,6 +16,8 @@ namespace App\Http\Controllers; use App\Models\Post; use App\Models\Forum; use App\Models\Topic; +use App\Repositories\ChatRepository; +use App\Repositories\TaggedUserRepository; use Illuminate\Support\Str; use Illuminate\Http\Request; use App\Achievements\UserMade25Posts; @@ -33,6 +35,28 @@ use App\Achievements\UserMadeFirstPost; class TopicController extends Controller { + /** + * @var TaggedUserRepository + */ + private $tag; + + /** + * @var ChatRepository + */ + private $chat; + + /** + * ForumController Constructor. + * + * @param TaggedUserRepository $tag + * @param ChatRepository $chat + */ + public function __construct(TaggedUserRepository $tag, ChatRepository $chat) + { + $this->tag = $tag; + $this->chat = $chat; + } + /** * Show The Topic. * @@ -40,7 +64,7 @@ class TopicController extends Controller * * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ - public function topic($id) + public function topic($id, $page = '', $post = '') { // Find the topic $topic = Topic::findOrFail($id); @@ -186,7 +210,7 @@ class TopicController extends Controller // Post To ShoutBox $appurl = config('app.url'); - $topicUrl = "{$appurl}/forums/topic/{$topic->slug}.{$topic->id}"; + $topicUrl = "{$appurl}/forums/topics/{$topic->id}"; $profileUrl = "{$appurl}/{$user->username}.{$user->id}"; $this->chat->systemMessage("[url={$profileUrl}]{$user->username}[/url] has created a new topic [url={$topicUrl}]{$topic->name}[/url]"); diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 627eb0e18..ae71a8d5c 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -307,7 +307,7 @@ class UserController extends Controller $user->twostep = $request->input('twostep'); $user->save(); - return redirect()->route('user_profile', ['username' => $user->username]) + return redirect()->route('users.show', ['username' => $user->username]) ->withSuccess('You Changed Your TwoStep Auth Status!'); } @@ -409,7 +409,7 @@ class UserController extends Controller $user->private_profile = 1; $user->save(); - return redirect()->route('user_profile', ['username' => $user->username]) + return redirect()->route('users.show', ['username' => $user->username]) ->withSuccess('You Have Gone Private!'); } @@ -430,7 +430,7 @@ class UserController extends Controller $user->private_profile = 0; $user->save(); - return redirect()->route('user_profile', ['username' => $user->username]) + return redirect()->route('users.show', ['username' => $user->username]) ->withSuccess('You Have Gone Public!'); } @@ -451,7 +451,7 @@ class UserController extends Controller $user->block_notifications = 1; $user->save(); - return redirect()->route('user_profile', ['username' => $user->username]) + return redirect()->route('users.show', ['username' => $user->username]) ->withSuccess('You Have Disabled Notifications!'); } @@ -472,7 +472,7 @@ class UserController extends Controller $user->block_notifications = 0; $user->save(); - return redirect()->route('user_profile', ['username' => $user->username]) + return redirect()->route('users.show', ['username' => $user->username]) ->withSuccess('You Have Enabled Notifications!'); } @@ -493,7 +493,7 @@ class UserController extends Controller $user->hidden = 1; $user->save(); - return redirect()->route('user_profile', ['username' => $user->username]) + return redirect()->route('users.show', ['username' => $user->username]) ->withSuccess('You Have Disappeared Like A Ninja!'); } @@ -514,7 +514,7 @@ class UserController extends Controller $user->hidden = 0; $user->save(); - return redirect()->route('user_profile', ['username' => $user->username]) + return redirect()->route('users.show', ['username' => $user->username]) ->withSuccess('You Have Given Up Your Ninja Ways And Become Visible!'); } diff --git a/app/Notifications/NewBon.php b/app/Notifications/NewBon.php index 332fe7c1d..6671ed63e 100644 --- a/app/Notifications/NewBon.php +++ b/app/Notifications/NewBon.php @@ -68,7 +68,7 @@ class NewBon extends Notification implements ShouldQueue return [ 'title' => $this->sender.' Has Gifted You '.$this->transaction->cost.' BON', 'body' => $this->sender.' has gifted you '.$this->transaction->cost.' BON with the following note: '.$this->transaction->comment, - 'url' => "/{$this->transaction->senderObj->username}.{$this->transaction->senderObj->id}", + 'url' => "/users/{$this->transaction->senderObj->id}", ]; } } diff --git a/app/Notifications/NewComment.php b/app/Notifications/NewComment.php index 290594166..b0720302d 100644 --- a/app/Notifications/NewComment.php +++ b/app/Notifications/NewComment.php @@ -64,13 +64,13 @@ class NewComment extends Notification return [ 'title' => 'New Torrent Comment Received', 'body' => $this->comment->user->username.' has left you a comment on Torrent '.$this->comment->torrent->name, - 'url' => '/torrents/'.$this->comment->torrent->slug.'.'.$this->comment->torrent->id, + 'url' => '/torrents/'.$this->comment->torrent->id, ]; } else { return [ 'title' => 'New Torrent Comment Received', 'body' => 'Anonymous has left you a comment on Torrent '.$this->comment->torrent->name, - 'url' => '/torrents/'.$this->comment->torrent->slug.'.'.$this->comment->torrent->id, + 'url' => '/torrents/'.$this->comment->torrent->id, ]; } } @@ -78,13 +78,13 @@ class NewComment extends Notification return [ 'title' => 'New Request Comment Received', 'body' => $this->comment->user->username.' has left you a comment on Torrent Request '.$this->comment->request->name, - 'url' => '/request/'.$this->comment->request->id, + 'url' => '/requests/'.$this->comment->request->id, ]; } else { return [ 'title' => 'New Request Comment Received', 'body' => 'Anonymous has left you a comment on Torrent Request '.$this->comment->request->name, - 'url' => '/request/'.$this->comment->request->id, + 'url' => '/requests/'.$this->comment->request->id, ]; } } diff --git a/app/Notifications/NewCommentTag.php b/app/Notifications/NewCommentTag.php index d78d924b7..30282598c 100644 --- a/app/Notifications/NewCommentTag.php +++ b/app/Notifications/NewCommentTag.php @@ -69,20 +69,20 @@ class NewCommentTag extends Notification implements ShouldQueue return [ 'title' => $this->tagger.' Has Tagged You In A Torrent Comment', 'body' => $this->tagger.' has tagged you in a Comment for Torrent '.$this->comment->torrent->name, - 'url' => "/torrents/{$this->comment->torrent->slug}.{$this->comment->torrent->id}", + 'url' => "/torrents/{$this->comment->torrent->id}", ]; } elseif ($this->type == 'request') { return [ 'title' => $this->tagger.' Has Tagged You In A Request Comment', 'body' => $this->tagger.' has tagged you in a Comment for Request '.$this->comment->request->name, - 'url' => "/request/{$this->comment->request->id}", + 'url' => "/requests/{$this->comment->request->id}", ]; } return [ 'title' => $this->tagger.' Has Tagged You In An Article Comment', 'body' => $this->tagger.' has tagged you in a Comment for Article '.$this->comment->article->title, - 'url' => "/articles/{$this->comment->article->slug}.{$this->comment->article->id}", + 'url' => "/articles/{$this->comment->article->id}", ]; } } diff --git a/app/Notifications/NewFollow.php b/app/Notifications/NewFollow.php index daf325a30..8987de910 100644 --- a/app/Notifications/NewFollow.php +++ b/app/Notifications/NewFollow.php @@ -73,7 +73,7 @@ class NewFollow extends Notification implements ShouldQueue return [ 'title' => $this->sender->username.' Has Followed You!', 'body' => $this->sender->username.' has started to follow you so they will get notifications about your activities.', - 'url' => "/{$this->sender->slug}.{$this->sender->id}", + 'url' => "/users/{$this->sender->id}", ]; } } diff --git a/app/Notifications/NewPost.php b/app/Notifications/NewPost.php index 4db9d1bf6..5cbb7e910 100644 --- a/app/Notifications/NewPost.php +++ b/app/Notifications/NewPost.php @@ -71,13 +71,13 @@ class NewPost extends Notification implements ShouldQueue return [ 'title' => $this->poster->username.' Has Posted In A Subscribed Topic', 'body' => $this->poster->username.' has left a new post in Subscribed Topic '.$this->post->topic->name, - 'url' => "/forums/topic/{$this->post->topic->slug}.{$this->post->topic->id}?page={$this->post->getPageNumber()}#post-{$this->post->id}", + 'url' => "/forums/topics/{$this->post->topic->id}?page={$this->post->getPageNumber()}#post-{$this->post->id}", ]; } else { return [ 'title' => $this->poster->username.' Has Posted In A Topic You Started', 'body' => $this->poster->username.' has left a new post in Your Topic '.$this->post->topic->name, - 'url' => "/forums/topic/{$this->post->topic->slug}.{$this->post->topic->id}?page={$this->post->getPageNumber()}#post-{$this->post->id}", + 'url' => "/forums/topics/{$this->post->topic->id}?page={$this->post->getPageNumber()}#post-{$this->post->id}", ]; } } diff --git a/app/Notifications/NewPostTag.php b/app/Notifications/NewPostTag.php index 76bfe0da0..88f49be67 100644 --- a/app/Notifications/NewPostTag.php +++ b/app/Notifications/NewPostTag.php @@ -68,7 +68,7 @@ class NewPostTag extends Notification implements ShouldQueue return [ 'title' => $this->tagger.' Has Tagged You In A Post', 'body' => $this->tagger.' has tagged you in a Post in Topic '.$this->post->topic->name, - 'url' => "/forums/topic/{$this->post->topic->slug}.{$this->post->topic->id}?page={$this->post->getPageNumber()}#post-{$this->post->id}", + 'url' => "/forums/topics/{$this->post->topic->id}?page={$this->post->getPageNumber()}#post-{$this->post->id}", ]; } } diff --git a/app/Notifications/NewPostTip.php b/app/Notifications/NewPostTip.php index b1cfdf444..392bf3f21 100644 --- a/app/Notifications/NewPostTip.php +++ b/app/Notifications/NewPostTip.php @@ -72,7 +72,7 @@ class NewPostTip extends Notification implements ShouldQueue return [ 'title' => $this->tipper.' Has Tipped You '.$this->amount.' BON For A Forum Post', 'body' => $this->tipper.' has tipped one of your Forum posts in '.$this->post->topic->name, - 'url' => "/forums/topic/{$this->post->topic->slug}.{$this->post->topic->id}?page={$this->post->getPageNumber()}#post-{$this->post->id}", + 'url' => "/forums/topics/{$this->post->topic->id}?page={$this->post->getPageNumber()}#post-{$this->post->id}", ]; } } diff --git a/app/Notifications/NewRequestBounty.php b/app/Notifications/NewRequestBounty.php index e4a407bc5..424d1a26b 100644 --- a/app/Notifications/NewRequestBounty.php +++ b/app/Notifications/NewRequestBounty.php @@ -72,7 +72,7 @@ class NewRequestBounty extends Notification implements ShouldQueue return [ 'title' => $this->sender.' Has Added A Bounty Of '.$this->amount.' To A Requested Torrent', 'body' => $this->sender.' has added a bounty to one of your Requested Torrents '.$this->tr->name, - 'url' => "/request/{$this->tr->id}", + 'url' => "/requests/{$this->tr->id}", ]; } } diff --git a/app/Notifications/NewRequestClaim.php b/app/Notifications/NewRequestClaim.php index 1e5806df6..95c7e8c32 100644 --- a/app/Notifications/NewRequestClaim.php +++ b/app/Notifications/NewRequestClaim.php @@ -68,7 +68,7 @@ class NewRequestClaim extends Notification implements ShouldQueue return [ 'title' => $this->sender.' Has Claimed One Of Your Requested Torrents', 'body' => $this->sender.' has claimed your Requested Torrent '.$this->tr->name, - 'url' => "/request/{$this->tr->id}", + 'url' => "/requests/{$this->tr->id}", ]; } } diff --git a/app/Notifications/NewRequestFill.php b/app/Notifications/NewRequestFill.php index 932e142f1..ebd177dd8 100644 --- a/app/Notifications/NewRequestFill.php +++ b/app/Notifications/NewRequestFill.php @@ -68,7 +68,7 @@ class NewRequestFill extends Notification implements ShouldQueue return [ 'title' => $this->sender.' Has Filled One Of Your Torrent Requests', 'body' => $this->sender.' has filled one of your Requested Torrents '.$this->tr->name, - 'url' => "/request/{$this->tr->id}", + 'url' => "/requests/{$this->tr->id}", ]; } } diff --git a/app/Notifications/NewRequestFillApprove.php b/app/Notifications/NewRequestFillApprove.php index 360b5080d..47b2bb087 100644 --- a/app/Notifications/NewRequestFillApprove.php +++ b/app/Notifications/NewRequestFillApprove.php @@ -68,7 +68,7 @@ class NewRequestFillApprove extends Notification implements ShouldQueue return [ 'title' => $this->sender.' Has Approved Your Fill Of A Requested Torrent', 'body' => $this->sender.' has approved your fill of Requested Torrent '.$this->tr->name, - 'url' => "/request/{$this->tr->id}", + 'url' => "/requests/{$this->tr->id}", ]; } } diff --git a/app/Notifications/NewRequestFillReject.php b/app/Notifications/NewRequestFillReject.php index 6034aed11..15878b561 100644 --- a/app/Notifications/NewRequestFillReject.php +++ b/app/Notifications/NewRequestFillReject.php @@ -68,7 +68,7 @@ class NewRequestFillReject extends Notification implements ShouldQueue return [ 'title' => $this->sender.' Has Rejected Your Fill Of A Requested Torrent', 'body' => $this->sender.' has rejected your fill of Requested Torrent '.$this->tr->name, - 'url' => "/request/{$this->tr->id}", + 'url' => "/requests/{$this->tr->id}", ]; } } diff --git a/app/Notifications/NewRequestUnclaim.php b/app/Notifications/NewRequestUnclaim.php index d91ca0af7..439b2ac82 100644 --- a/app/Notifications/NewRequestUnclaim.php +++ b/app/Notifications/NewRequestUnclaim.php @@ -68,7 +68,7 @@ class NewRequestUnclaim extends Notification implements ShouldQueue return [ 'title' => $this->sender.' Has Unclaimed One Of Your Requested Torrents', 'body' => $this->sender.' has unclaimed your Requested Torrent '.$this->tr->name, - 'url' => "/request/{$this->tr->id}", + 'url' => "/requests/{$this->tr->id}", ]; } } diff --git a/app/Notifications/NewReseedRequest.php b/app/Notifications/NewReseedRequest.php index ff080f680..ba79186df 100644 --- a/app/Notifications/NewReseedRequest.php +++ b/app/Notifications/NewReseedRequest.php @@ -60,7 +60,7 @@ class NewReseedRequest extends Notification implements ShouldQueue return [ 'title' => 'New Reseed Request', 'body' => "Some time ago, you downloaded: {$this->torrent->name}. Now its dead and someone has requested a reseed on it. If you still have this torrent in storage, please consider reseeding it!", - 'url' => "{$appurl}/torrents/{$this->torrent->slug}.{$this->torrent->id}", + 'url' => "{$appurl}/torrents/{$this->torrent->id}", ]; } } diff --git a/app/Notifications/NewThank.php b/app/Notifications/NewThank.php index 0106aae60..c42ff818b 100644 --- a/app/Notifications/NewThank.php +++ b/app/Notifications/NewThank.php @@ -63,7 +63,7 @@ class NewThank extends Notification return [ 'title' => $this->thank->user->username.' Has Thanked You For An Uploaded Torrent', 'body' => $this->thank->user->username.' has left you a thanks on Uploaded Torrent '.$this->thank->torrent->name, - 'url' => '/torrents/'.$this->thank->torrent->slug.'.'.$this->thank->torrent->id, + 'url' => '/torrents/'.$this->thank->torrent->id, ]; } } diff --git a/app/Notifications/NewTopic.php b/app/Notifications/NewTopic.php index bfb4f24ae..c1334bcf1 100644 --- a/app/Notifications/NewTopic.php +++ b/app/Notifications/NewTopic.php @@ -69,7 +69,7 @@ class NewTopic extends Notification implements ShouldQueue return [ 'title' => $this->poster->username.' Has Posted In A Subscribed Forum', 'body' => $this->poster->username.' has started a new topic in '.$this->topic->forum->name, - 'url' => "/forums/topic/{$this->topic->slug}.{$this->topic->id}", + 'url' => "/forums/topics/{$this->topic->id}", ]; } } diff --git a/app/Notifications/NewUnfollow.php b/app/Notifications/NewUnfollow.php index 9ec4cf762..23563538c 100644 --- a/app/Notifications/NewUnfollow.php +++ b/app/Notifications/NewUnfollow.php @@ -68,7 +68,7 @@ class NewUnfollow extends Notification implements ShouldQueue return [ 'title' => $this->sender->username.' Has Unfollowed You!', 'body' => $this->sender->username.' has stopped following you so they will no longer get notifications about your activities.', - 'url' => '/'.$this->sender->slug.'.'.$this->sender->id, + 'url' => '/users/'.$this->sender->id, ]; } } diff --git a/app/Notifications/NewUpload.php b/app/Notifications/NewUpload.php index be4e34ecd..17ef1c05f 100644 --- a/app/Notifications/NewUpload.php +++ b/app/Notifications/NewUpload.php @@ -66,7 +66,7 @@ class NewUpload extends Notification implements ShouldQueue return [ 'title' => $this->torrent->user->username.' Has Uploaded A New Torrent', 'body' => "{$this->torrent->user->username}, whom you are following has uploaded Torrent {$this->torrent->name}", - 'url' => "/torrents/{$this->torrent->slug}.{$this->torrent->id}", + 'url' => "/torrents/{$this->torrent->id}", ]; } } diff --git a/app/Notifications/NewUploadTip.php b/app/Notifications/NewUploadTip.php index 60e234b11..f045a885d 100644 --- a/app/Notifications/NewUploadTip.php +++ b/app/Notifications/NewUploadTip.php @@ -72,7 +72,7 @@ class NewUploadTip extends Notification implements ShouldQueue return [ 'title' => $this->tipper.' Has Tipped You '.$this->amount.' BON For An Uploaded Torrent', 'body' => $this->tipper.' has tipped one of your Uploaded Torrents '.$this->torrent->name, - 'url' => "/torrents/{$this->torrent->slug}.{$this->torrent->id}", + 'url' => "/torrents/{$this->torrent->id}", ]; } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index cc3539534..30a0f3bbf 100755 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -38,7 +38,7 @@ class AppServiceProvider extends ServiceProvider // Share $pages across all views view()->composer('*', function (View $view) { $pages = cache()->remember('cached-pages', 3600, function () { - return Page::select(['id', 'name', 'slug'])->take(6)->get(); + return Page::select(['id', 'name', 'slug', 'created_at'])->take(6)->get(); }); $view->with(compact('pages')); diff --git a/database/migrations/2017_12_10_020753_create_users_table.php b/database/migrations/2017_12_10_020753_create_users_table.php index 994bd3da7..9e92401e1 100644 --- a/database/migrations/2017_12_10_020753_create_users_table.php +++ b/database/migrations/2017_12_10_020753_create_users_table.php @@ -40,7 +40,7 @@ class CreateUsersTable extends Migration $table->float('seedbonus', 12)->unsigned()->default(0.00); $table->integer('invites')->unsigned()->default(0); $table->integer('hitandruns')->unsigned()->default(0); - $table->string('rsskey')->default('abcdefg'); + $table->string('rsskey'); $table->boolean('hidden')->default(0); $table->boolean('style')->default(0); $table->boolean('nav')->default(0); diff --git a/database/seeds/PagesTableSeeder.php b/database/seeds/PagesTableSeeder.php index 9dca9fca1..849958dbd 100644 --- a/database/seeds/PagesTableSeeder.php +++ b/database/seeds/PagesTableSeeder.php @@ -10,6 +10,8 @@ * @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0 * @author HDVinnie */ + +use App\Models\Page; use Illuminate\Database\Seeder; class PagesTableSeeder extends Seeder @@ -21,54 +23,46 @@ class PagesTableSeeder extends Seeder */ public function run() { - \DB::table('pages')->delete(); + Page::create([ + 'id' => 1, + 'name' => 'Rules', + 'slug' => 'rules', + 'content' => 'RULES GOES HERE', + ]); - \DB::table('pages')->insert([ - 0 => [ - 'id' => 1, - 'name' => 'Rules', - 'slug' => 'rules', - 'content' => 'RULES GOES HERE', - 'created_at' => '2016-12-20 22:09:45', - 'updated_at' => '2017-12-01 13:39:43', - ], - 1 => [ - 'id' => 3, - 'name' => 'FAQ', - 'slug' => 'faq', - 'content' => 'FAQ GOES HERE', - 'created_at' => '2017-10-28 21:26:15', - 'updated_at' => '2017-10-28 21:26:15', - ], - 2 => [ - 'id' => 4, - 'name' => 'Suggested Clients', - 'slug' => 'suggested-clients', - 'content' => 'We suggest the following BitTorrent clients.', - 'created_at' => '2017-01-27 15:52:01', - 'updated_at' => '2017-08-07 17:30:56', - ], - 3 => [ - 'id' => 5, - 'name' => 'Upload Guide', - 'slug' => 'upload-guide', - 'content' => 'UPLOAD GUIDE HERE', - 'created_at' => '2017-04-24 14:45:03', - 'updated_at' => '2017-08-07 17:34:42', - ], - 4 => [ - 'id' => 6, - 'name' => 'Tracker Codes', - 'slug' => 'tracker-codes', - 'content' => 'Our Tracker Codes/Responses', - 'created_at' => '2017-09-08 14:23:16', - 'updated_at' => '2017-09-08 14:27:12', - ], - 5 => [ - 'id' => 7, - 'name' => 'Terms Of Use', - 'slug' => 'terms-of-use', - 'content' => '*All references to "we", "us" or "our" refer to the site owner(s). + Page::create([ + 'id' => 2, + 'name' => 'FAQ', + 'slug' => 'faq', + 'content' => 'FAQ GOES HERE', + ]); + + Page::create([ + 'id' => 3, + 'name' => 'Suggested Clients', + 'slug' => 'suggested-clients', + 'content' => 'We suggest the following BitTorrent clients.', + ]); + + Page::create([ + 'id' => 4, + 'name' => 'Upload Guide', + 'slug' => 'upload-guide', + 'content' => 'UPLOAD GUIDE HERE', + ]); + + Page::create([ + 'id' => 5, + 'name' => 'Tracker Codes', + 'slug' => 'tracker-codes', + 'content' => 'Our Tracker Codes/Responses', + ]); + + Page::create([ + 'id' => 6, + 'name' => 'Terms Of Use', + 'slug' => 'terms-of-use', + 'content' => '*All references to "we", "us" or "our" refer to the site owner(s). Welcome to our website located at '.config('app.url').' (this "Site")! This Site allows you to: (a) participate in interactive features that we may make available from time to time through the Site; or @@ -147,9 +141,6 @@ YOU AGREE THAT YOUR USE OF THIS SITE AND SERVICES WILL BE AT YOUR SOLE RISK. WE (D) ANY INTERRUPTION OR CESSATION OF TRANSMISSION TO OR FROM THIS SITE, (E) ANY BUGS, VIRUSES, TROJAN HORSES, OR THE LIKE, WHICH MAY BE TRANSMITTED TO OR THROUGH THIS SITE BY ANY THIRD PARTY, AND/OR (F) ANY ERRORS OR OMISSIONS IN ANY CONTRIBUTIONS, CONTENT AND MATERIALS OR FOR ANY LOSS OR DAMAGE OF ANY KIND INCURRED AS A RESULT OF THE USE OF ANY CONTENT, CONTRIBUTIONS, OR MATERIALS POSTED, TRANSMITTED, OR OTHERWISE MADE AVAILABLE VIA THIS SITE.WE WILL NOT BE LIABLE TO YOU FOR ANY LOSS OF ANY DATA (INCLUDING CONTENT) OR FOR LOSS OF USE OF THIS SITE.SOME STATES OR JURISDICTIONS DO NOT ALLOW THE LIMITATION OR EXCLUSION OF CERTAIN WARRANTIES, OR THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES. IF YOU RESIDE IN ONE OF THESE STATES OR JURISDICTIONS, THE ABOVE LIMITATIONS OR EXCLUSIONS MAY NOT APPLY TO YOU.', - 'created_at' => '2017-10-03 14:50:15', - 'updated_at' => '2017-10-03 18:31:25', - ], ]); } } diff --git a/resources/views/Staff/application/show.blade.php b/resources/views/Staff/application/show.blade.php index 4afbf0133..e15569a2b 100644 --- a/resources/views/Staff/application/show.blade.php +++ b/resources/views/Staff/application/show.blade.php @@ -65,7 +65,7 @@ @foreach($application->imageProofs as $key => $img_proof)