@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | class Movies extends Model implements ItemInterface |
15 | 15 | { |
16 | - protected $fillable = ['title', 'description', 'categories_id']; |
|
16 | + protected $fillable = [ 'title', 'description', 'categories_id' ]; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Décrit le nom de la table |
@@ -36,13 +36,13 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function handle() |
38 | 38 | { |
39 | - $infos = \Thujohn\Twitter\Facades\Twitter::getUsersLookup(['screen_name' => 'Symfomany', 'format' => 'php']); |
|
39 | + $infos = \Thujohn\Twitter\Facades\Twitter::getUsersLookup([ 'screen_name' => 'Symfomany', 'format' => 'php' ]); |
|
40 | 40 | $manager = new \MongoDB\Driver\Manager("mongodb://localhost:27017"); |
41 | 41 | $collection = new \MongoDB\Collection($manager, "laravel.tweets"); |
42 | 42 | |
43 | 43 | if (!empty($infos)) { |
44 | 44 | |
45 | - $collection->deleteMany(['origin' => 'Twitter', 'type' => 'infos']); |
|
45 | + $collection->deleteMany([ 'origin' => 'Twitter', 'type' => 'infos' ]); |
|
46 | 46 | |
47 | 47 | $stat = [ |
48 | 48 | "origin" => "Twitter", |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | |
55 | 55 | } |
56 | 56 | |
57 | - $tweets = \Thujohn\Twitter\Facades\Twitter::getDmsOut(['format' => 'php']); |
|
57 | + $tweets = \Thujohn\Twitter\Facades\Twitter::getDmsOut([ 'format' => 'php' ]); |
|
58 | 58 | if (!empty($tweets)) { |
59 | - $collection->deleteMany(['origin' => 'Twitter', 'type' => 'dmsout']); |
|
59 | + $collection->deleteMany([ 'origin' => 'Twitter', 'type' => 'dmsout' ]); |
|
60 | 60 | |
61 | 61 | foreach ($tweets as $tweet) { |
62 | 62 | $stat = [ |
@@ -69,9 +69,9 @@ discard block |
||
69 | 69 | } |
70 | 70 | } |
71 | 71 | |
72 | - $tweets = \Thujohn\Twitter\Facades\Twitter::getFavorites(['format' => 'php']); |
|
72 | + $tweets = \Thujohn\Twitter\Facades\Twitter::getFavorites([ 'format' => 'php' ]); |
|
73 | 73 | if (!empty($tweets)) { |
74 | - $collection->deleteMany(['origin' => 'Twitter', 'type' => 'favorites']); |
|
74 | + $collection->deleteMany([ 'origin' => 'Twitter', 'type' => 'favorites' ]); |
|
75 | 75 | |
76 | 76 | foreach ($tweets as $tweet) { |
77 | 77 | |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | 'format' => 'php', ]); |
93 | 93 | |
94 | 94 | if (!empty($tweets)) { |
95 | - $collection->deleteMany(['origin' => 'Twitter', 'type' => 'mentionstimeline']); |
|
95 | + $collection->deleteMany([ 'origin' => 'Twitter', 'type' => 'mentionstimeline' ]); |
|
96 | 96 | |
97 | 97 | |
98 | 98 | foreach ($tweets as $tweet) { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | ]); |
115 | 115 | |
116 | 116 | if (!empty($tweets)) { |
117 | - $collection->deleteMany(['origin' => 'Twitter', 'type' => 'hometimeline']); |
|
117 | + $collection->deleteMany([ 'origin' => 'Twitter', 'type' => 'hometimeline' ]); |
|
118 | 118 | |
119 | 119 | foreach ($tweets as $tweet) { |
120 | 120 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | ]); |
137 | 137 | |
138 | 138 | if (!empty($tweets)) { |
139 | - $collection->deleteMany(['origin' => 'Twitter', 'type' => 'usertimeline']); |
|
139 | + $collection->deleteMany([ 'origin' => 'Twitter', 'type' => 'usertimeline' ]); |
|
140 | 140 | |
141 | 141 | foreach ($tweets as $tweet) { |
142 | 142 |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | | kernel and includes session state, CSRF protection, and more. |
12 | 12 | | |
13 | 13 | */ |
14 | -Route::group(['middleware' => ['web']], function () { |
|
14 | +Route::group([ 'middleware' => [ 'web' ] ], function() { |
|
15 | 15 | |
16 | 16 | Route::auth(); |
17 | 17 | |
@@ -32,12 +32,12 @@ discard block |
||
32 | 32 | /* |
33 | 33 | * BackOffice |
34 | 34 | */ |
35 | - Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () { |
|
35 | + Route::group([ 'prefix' => 'admin', 'middleware' => 'auth' ], function() { |
|
36 | 36 | |
37 | 37 | /* |
38 | 38 | * Cart Payment |
39 | 39 | */ |
40 | - Route::group(['prefix' => 'cart'], function () { |
|
40 | + Route::group([ 'prefix' => 'cart' ], function() { |
|
41 | 41 | /* |
42 | 42 | * Pages Recapitulatif |
43 | 43 | */ |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | /* |
93 | 93 | * COMMENTAIRES |
94 | 94 | */ |
95 | - Route::group(['prefix' => 'comments'], function () { |
|
96 | - Route::get('/index', ['uses' => 'CommentsController@index', 'as' => 'comments.index']); |
|
97 | - Route::post('{id}/update', ['uses' => 'CommentsController@update', 'as' => 'comments.update']); |
|
95 | + Route::group([ 'prefix' => 'comments' ], function() { |
|
96 | + Route::get('/index', [ 'uses' => 'CommentsController@index', 'as' => 'comments.index' ]); |
|
97 | + Route::post('{id}/update', [ 'uses' => 'CommentsController@update', 'as' => 'comments.update' ]); |
|
98 | 98 | |
99 | 99 | /* |
100 | 100 | * Action Like |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | /* |
110 | 110 | * CRUD de Movies |
111 | 111 | */ |
112 | - Route::group(['prefix' => 'movies'], function () { |
|
112 | + Route::group([ 'prefix' => 'movies' ], function() { |
|
113 | 113 | |
114 | 114 | /* |
115 | 115 | * Page index: liste des films |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | }); |
187 | 187 | |
188 | 188 | // CRUD de categories |
189 | - Route::group(['prefix' => 'categories'], function () { |
|
189 | + Route::group([ 'prefix' => 'categories' ], function() { |
|
190 | 190 | |
191 | 191 | Route::get('/index', [ |
192 | 192 | 'as' => 'categories_index', |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | }); |
234 | 234 | |
235 | 235 | // CRUD de actors |
236 | - Route::group(['prefix' => 'actors'], function () { |
|
236 | + Route::group([ 'prefix' => 'actors' ], function() { |
|
237 | 237 | |
238 | 238 | Route::get('/index', [ |
239 | 239 | 'as' => 'actors_index', |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | }); |
259 | 259 | |
260 | 260 | // CRUD de directors |
261 | - Route::group(['prefix' => 'directors'], function () { |
|
261 | + Route::group([ 'prefix' => 'directors' ], function() { |
|
262 | 262 | |
263 | 263 | Route::get('/index', [ |
264 | 264 | 'as' => 'directors_delete', |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | |
283 | 283 | }); |
284 | 284 | |
285 | - Route::group(['prefix' => 'api'], function () { |
|
285 | + Route::group([ 'prefix' => 'api' ], function() { |
|
286 | 286 | |
287 | 287 | // mon retour en JSON de mes catégories |
288 | 288 | Route::get('/categories', [ |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | }); |
299 | 299 | |
300 | 300 | // CRUD de administrators |
301 | - Route::group(['prefix' => 'administrators', 'middleware' => 'authorisation'], function () { |
|
301 | + Route::group([ 'prefix' => 'administrators', 'middleware' => 'authorisation' ], function() { |
|
302 | 302 | |
303 | 303 | Route::get('/index', [ |
304 | 304 | 'as' => 'administrators_index', |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | /* |
347 | 347 | * Page FAQ |
348 | 348 | */ |
349 | - Route::get('/faq', function () { |
|
349 | + Route::get('/faq', function() { |
|
350 | 350 | |
351 | 351 | return view('Pages/faq'); |
352 | 352 | }); |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | /* |
355 | 355 | * Page about |
356 | 356 | */ |
357 | - Route::get('/about', function () { |
|
357 | + Route::get('/about', function() { |
|
358 | 358 | |
359 | 359 | // retourne le nom de la vue |
360 | 360 | return view('Pages/about'); |
@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | /* |
364 | 364 | * Pages concept |
365 | 365 | */ |
366 | - Route::get('/concept', function () { |
|
366 | + Route::get('/concept', function() { |
|
367 | 367 | |
368 | 368 | // retourne le nom de la vue |
369 | 369 | return view('Pages/concept'); |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | if (!empty($channel)) { |
49 | 49 | $manager = new \MongoDB\Driver\Manager("mongodb://localhost:27017"); |
50 | 50 | $collection = new \MongoDB\Collection($manager, "laravel.stats"); |
51 | - $collection->deleteMany([]); |
|
51 | + $collection->deleteMany([ ]); |
|
52 | 52 | |
53 | 53 | $collection = new \MongoDB\Collection($manager, "laravel.stats"); |
54 | 54 | $stat = [ |
@@ -67,11 +67,11 @@ discard block |
||
67 | 67 | 'maxResults' => 30, |
68 | 68 | ]; |
69 | 69 | |
70 | - $videos = Yt::searchAdvanced($params, true)['results']; |
|
70 | + $videos = Yt::searchAdvanced($params, true)[ 'results' ]; |
|
71 | 71 | |
72 | 72 | if (!empty($videos)) { |
73 | 73 | $collection = new \MongoDB\Collection($manager, "laravel.videos"); |
74 | - $collection->deleteMany([]); |
|
74 | + $collection->deleteMany([ ]); |
|
75 | 75 | |
76 | 76 | foreach ($videos as $video) { |
77 | 77 | $collection = new \MongoDB\Collection($manager, "laravel.videos"); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | public function ajaxmovies(Request $request) |
37 | 37 | { |
38 | 38 | $validator = Validator::make( |
39 | - $request->all(), //request all : tous les elements de requetses |
|
39 | + $request->all(), //request all : tous les elements de requetses |
|
40 | 40 | [ |
41 | 41 | 'title' => 'required|min:10', |
42 | 42 | ], [ |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $executePayment = $payment->execute($paymentExecution, $this->_apiContext); |
78 | 78 | |
79 | 79 | // Clear the shopping cart, write to database, send notifications, etc. |
80 | - $request->session()->pull('likes', []); |
|
80 | + $request->session()->pull('likes', [ ]); |
|
81 | 81 | |
82 | 82 | return view('Main/index'); |
83 | 83 | } |
@@ -97,10 +97,10 @@ discard block |
||
97 | 97 | $videos = collect($collection->find()->toArray())->shuffle(); |
98 | 98 | |
99 | 99 | $collection = new \MongoDB\Collection($manager, 'laravel', 'stats'); |
100 | - $youtubeinfo = collect($collection->find(['origin' => 'Youtube'])->toArray())->first(); |
|
100 | + $youtubeinfo = collect($collection->find([ 'origin' => 'Youtube' ])->toArray())->first(); |
|
101 | 101 | |
102 | 102 | $collection = new \MongoDB\Collection($manager, 'laravel', 'stats'); |
103 | - $tweeterinfo = collect($collection->find(['origin' => 'Twitter', 'type' => 'infos'])->toArray())->first(); |
|
103 | + $tweeterinfo = collect($collection->find([ 'origin' => 'Twitter', 'type' => 'infos' ])->toArray())->first(); |
|
104 | 104 | |
105 | 105 | $actor = new Actors(); // Je récpere mon modèle |
106 | 106 | $comment = new Comments(); // Je récpere mon modèle |
@@ -121,11 +121,11 @@ discard block |
||
121 | 121 | 'avgnotepresse' => $avgnotepresse->avgpress, |
122 | 122 | 'avgacteurs' => $avgacteurs->age, |
123 | 123 | 'videos' => $videos, |
124 | - 'video' => $videos[0], |
|
124 | + 'video' => $videos[ 0 ], |
|
125 | 125 | 'youtubeinfo' => $youtubeinfo->data, |
126 | - 'tweeterinfo' => $tweeterinfo['data'][0], |
|
126 | + 'tweeterinfo' => $tweeterinfo[ 'data' ][ 0 ], |
|
127 | 127 | 'youtubeinfodateupdated' => $youtubeinfo->created, |
128 | - 'tweeterinfodateupdated' => $tweeterinfo['created_at'], |
|
128 | + 'tweeterinfodateupdated' => $tweeterinfo[ 'created_at' ], |
|
129 | 129 | 'avghour' => $avghour->avghour, |
130 | 130 | 'nbacteurs' => $nbacteurs, |
131 | 131 | 'nbcommentaires' => $nbcommentaires, |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | public function __construct() |
65 | 65 | { |
66 | 66 | // application du middleware guest |
67 | - $this->middleware('guest', ['except' => 'logout']); |
|
67 | + $this->middleware('guest', [ 'except' => 'logout' ]); |
|
68 | 68 | } |
69 | 69 | |
70 | 70 | /** |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | protected function create(array $data) |
94 | 94 | { |
95 | 95 | return Administrators::create([ |
96 | - 'name' => $data['name'], |
|
97 | - 'email' => $data['email'], |
|
98 | - 'password' => bcrypt($data['password']), |
|
96 | + 'name' => $data[ 'name' ], |
|
97 | + 'email' => $data[ 'email' ], |
|
98 | + 'password' => bcrypt($data[ 'password' ]), |
|
99 | 99 | ]); |
100 | 100 | } |
101 | 101 |