Completed
Push — staging ( f5a6e6...ff0f9d )
by John
02:29
created
app/Video.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 
7 7
 class Video extends Model
8 8
 {
9
-    protected $fillable  =[
9
+    protected $fillable = [
10 10
         'title',
11 11
         'url',
12 12
         'description',
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function map(Router $router)
39 39
     {
40
-        $router->group(['namespace' => $this->namespace], function ($router) {
40
+        $router->group(['namespace' => $this->namespace], function($router) {
41 41
             require app_path('Http/routes.php');
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
app/Providers/AppServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function boot()
17 17
     {
18
-        Validator::extend('youtube_url', function ($attribute, $value, $parameters, $validator) {
18
+        Validator::extend('youtube_url', function($attribute, $value, $parameters, $validator) {
19 19
 
20 20
             $urlParts = [
21 21
                 'scheme',
Please login to merge, or discard this patch.
app/Http/routes.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 |
22 22
 */
23 23
 
24
-Route::group(['middleware' => 'web'], function () {
24
+Route::group(['middleware' => 'web'], function() {
25 25
 
26 26
     Route::auth();
27 27
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * Authentication routes
38 38
      */
39
-    Route::group(['prefix' => '/auth/{provider}'], function () {
39
+    Route::group(['prefix' => '/auth/{provider}'], function() {
40 40
         /**
41 41
          * redirect to social auth login using socialite
42 42
          */
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     /**
52 52
      * User profile routes
53 53
      */
54
-    Route::group(['prefix' => 'profile', 'middleware' => 'auth'], function () {
54
+    Route::group(['prefix' => 'profile', 'middleware' => 'auth'], function() {
55 55
 
56 56
         /**
57 57
          * Get authenitcated user's profile page
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     /**
82 82
      * User dashboard routes
83 83
      */
84
-    Route::group(['prefix' => 'dashboard', 'middleware' => 'auth'], function () {
84
+    Route::group(['prefix' => 'dashboard', 'middleware' => 'auth'], function() {
85 85
         /**
86 86
          * Show the new video page
87 87
          */
Please login to merge, or discard this patch.
app/Http/Controllers/DashboardController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
         $newVideo = Auth::user()->videos()->create($request->all());
38 38
         $newVideo->categories()->sync($request->input('category_list'));
39 39
 
40
-        return redirect('videos/' . $newVideo->id);
40
+        return redirect('videos/'.$newVideo->id);
41 41
     }
42 42
 
43 43
     /**
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
         $request->session()->flash('status', 'success');
83 83
         $request->session()->flash('message', 'Video successfully updated.');
84 84
 
85
-        return redirect('dashboard/videos/' . $id . '/edit');
85
+        return redirect('dashboard/videos/'.$id.'/edit');
86 86
     }
87 87
 
88 88
     /**
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $videos = Video::whereIn('id', Auth::user()->favorites->lists('video_id')->toArray());
117 117
         $favorites = [];
118 118
 
119
-        $videos->each(function ($video, $Key) use (&$favorites) {
119
+        $videos->each(function($video, $Key) use (&$favorites) {
120 120
             $favorites[$video->id] = $video->favorites->count();
121 121
         });
122 122
 
Please login to merge, or discard this patch.
app/Http/Repositories/VideoRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     public function getAllComments($videoId)
41 41
     {
42 42
         return Comment::where('video_id', $videoId)->get();
43
-        $comments = $comments->each(function ($comment, $key) {
43
+        $comments = $comments->each(function($comment, $key) {
44 44
             $comment['user'] = User::find($comment->user_id);
45 45
         });
46 46
     }
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
     {
138 138
         $topViewed = Video::orderBy('views', 'DESC')->get()->take($number);
139 139
 
140
-        $topFavorited = Video::all()->each(function ($video, $key) {
140
+        $topFavorited = Video::all()->each(function($video, $key) {
141 141
             $video->favorites = $video->favorites->count();
142 142
         })->sortByDesc('favorites')->take($number);
143 143
 
144
-        $topCommentedOn = Video::all()->each(function ($video, $key) {
144
+        $topCommentedOn = Video::all()->each(function($video, $key) {
145 145
             $video->comments = $video->comments->count();
146 146
         })->sortByDesc('comments')->take($number);
147 147
 
148
-        $topUsers = User::all()->each(function ($user, $key) {
148
+        $topUsers = User::all()->each(function($user, $key) {
149 149
             $user->videos = $user->videos->count();
150 150
         })->sortByDesc('videos')->take(5);
151 151
 
Please login to merge, or discard this patch.