@@ -29,7 +29,7 @@ |
||
29 | 29 | */ |
30 | 30 | public function register() |
31 | 31 | { |
32 | - $this->app->singleton(Cart::class, function ($app) { |
|
32 | + $this->app->singleton(Cart::class, function($app) { |
|
33 | 33 | return new Cart(); |
34 | 34 | }); |
35 | 35 | } |
@@ -20,7 +20,6 @@ |
||
20 | 20 | /** |
21 | 21 | * Handle the event. |
22 | 22 | * |
23 | - * @param Events $event |
|
24 | 23 | */ |
25 | 24 | public function handle(Administrators $user) |
26 | 25 | { |
@@ -49,7 +49,7 @@ |
||
49 | 49 | $users = $movie->actors(); |
50 | 50 | foreach ($users as $user) { |
51 | 51 | //send an email |
52 | - Mail::send('Emails/newsletter', [], function ($m) { |
|
52 | + Mail::send('Emails/newsletter', [ ], function($m) { |
|
53 | 53 | |
54 | 54 | $m->from('[email protected]', 'Florent Boyer'); |
55 | 55 | $m->to('[email protected]', 'Boyer Julien') |
@@ -26,12 +26,12 @@ discard block |
||
26 | 26 | /* |
27 | 27 | * BackOffice |
28 | 28 | */ |
29 | -Route::group(['prefix' => 'admin', 'middleware' => 'auth'], function () { |
|
29 | +Route::group([ 'prefix' => 'admin', 'middleware' => 'auth' ], function() { |
|
30 | 30 | |
31 | 31 | /* |
32 | 32 | * Cart Payment |
33 | 33 | */ |
34 | - Route::group(['prefix' => 'cart'], function () { |
|
34 | + Route::group([ 'prefix' => 'cart' ], function() { |
|
35 | 35 | /* |
36 | 36 | * Pages Recapitulatif |
37 | 37 | */ |
@@ -86,9 +86,9 @@ discard block |
||
86 | 86 | /* |
87 | 87 | * COMMENTAIRES |
88 | 88 | */ |
89 | - Route::group(['prefix' => 'comments'], function () { |
|
90 | - Route::get('/index', ['uses' => 'CommentsController@index', 'as' => 'comments.index']); |
|
91 | - Route::post('{id}/update', ['uses' => 'CommentsController@update', 'as' => 'comments.update']); |
|
89 | + Route::group([ 'prefix' => 'comments' ], function() { |
|
90 | + Route::get('/index', [ 'uses' => 'CommentsController@index', 'as' => 'comments.index' ]); |
|
91 | + Route::post('{id}/update', [ 'uses' => 'CommentsController@update', 'as' => 'comments.update' ]); |
|
92 | 92 | |
93 | 93 | /* |
94 | 94 | * Action Like |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /* |
104 | 104 | * CRUD de Movies |
105 | 105 | */ |
106 | - Route::group(['prefix' => 'movies'], function () { |
|
106 | + Route::group([ 'prefix' => 'movies' ], function() { |
|
107 | 107 | |
108 | 108 | /* |
109 | 109 | * Page index: liste des films |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | }); |
181 | 181 | |
182 | 182 | // CRUD de categories |
183 | - Route::group(['prefix' => 'categories'], function () { |
|
183 | + Route::group([ 'prefix' => 'categories' ], function() { |
|
184 | 184 | |
185 | 185 | Route::get('/index', [ |
186 | 186 | 'as' => 'categories_index', |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | }); |
228 | 228 | |
229 | 229 | // CRUD de actors |
230 | - Route::group(['prefix' => 'actors'], function () { |
|
230 | + Route::group([ 'prefix' => 'actors' ], function() { |
|
231 | 231 | |
232 | 232 | Route::get('/index', [ |
233 | 233 | 'as' => 'actors_index', |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | }); |
253 | 253 | |
254 | 254 | // CRUD de directors |
255 | - Route::group(['prefix' => 'directors'], function () { |
|
255 | + Route::group([ 'prefix' => 'directors' ], function() { |
|
256 | 256 | |
257 | 257 | Route::get('/index', [ |
258 | 258 | 'as' => 'directors_delete', |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | |
277 | 277 | }); |
278 | 278 | |
279 | - Route::group(['prefix' => 'api'], function () { |
|
279 | + Route::group([ 'prefix' => 'api' ], function() { |
|
280 | 280 | |
281 | 281 | // mon retour en JSON de mes catégories |
282 | 282 | Route::get('/categories', [ |
@@ -292,7 +292,7 @@ discard block |
||
292 | 292 | }); |
293 | 293 | |
294 | 294 | // CRUD de administrators |
295 | - Route::group(['prefix' => 'administrators', 'middleware' => 'authorisation'], function () { |
|
295 | + Route::group([ 'prefix' => 'administrators', 'middleware' => 'authorisation' ], function() { |
|
296 | 296 | |
297 | 297 | Route::get('/index', [ |
298 | 298 | 'as' => 'administrators_index', |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | /* |
341 | 341 | * Page FAQ |
342 | 342 | */ |
343 | -Route::get('/faq', function () { |
|
343 | +Route::get('/faq', function() { |
|
344 | 344 | |
345 | 345 | return view('Pages/faq'); |
346 | 346 | }); |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | /* |
349 | 349 | * Page about |
350 | 350 | */ |
351 | -Route::get('/about', function () { |
|
351 | +Route::get('/about', function() { |
|
352 | 352 | |
353 | 353 | // retourne le nom de la vue |
354 | 354 | return view('Pages/about'); |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | /* |
358 | 358 | * Pages concept |
359 | 359 | */ |
360 | -Route::get('/concept', function () { |
|
360 | +Route::get('/concept', function() { |
|
361 | 361 | |
362 | 362 | // retourne le nom de la vue |
363 | 363 | return view('Pages/concept'); |
@@ -15,11 +15,11 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public function categories() |
17 | 17 | { |
18 | - $tab = []; |
|
18 | + $tab = [ ]; |
|
19 | 19 | $categories = Categories::all(); |
20 | 20 | |
21 | 21 | foreach ($categories as $categorie) { |
22 | - $tab[] = |
|
22 | + $tab[ ] = |
|
23 | 23 | [ |
24 | 24 | $categorie->title, |
25 | 25 | count($categorie->movies), |
@@ -39,11 +39,11 @@ discard block |
||
39 | 39 | |
40 | 40 | //exit(dump($resultat)); |
41 | 41 | |
42 | - $tab = []; |
|
42 | + $tab = [ ]; |
|
43 | 43 | foreach ($resultat as $actor) { |
44 | - $tab[] = [ |
|
44 | + $tab[ ] = [ |
|
45 | 45 | 'name' => $actor->city, |
46 | - 'data' => [(int) $actor->nb], |
|
46 | + 'data' => [ (int) $actor->nb ], |
|
47 | 47 | ]; |
48 | 48 | } |
49 | 49 |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public function checkout() |
58 | 58 | { |
59 | - $ids = session('likes', []); |
|
59 | + $ids = session('likes', [ ]); |
|
60 | 60 | |
61 | 61 | $total = 0; |
62 | 62 | foreach ($ids as $id) { |
@@ -83,12 +83,12 @@ discard block |
||
83 | 83 | $payment->setIntent('sale'); |
84 | 84 | $payment->setPayer($payer); |
85 | 85 | $payment->setRedirectUrls($redirectUrls); |
86 | - $payment->setTransactions([$transaction]); |
|
86 | + $payment->setTransactions([ $transaction ]); |
|
87 | 87 | |
88 | 88 | //response de Paypal |
89 | 89 | $response = $payment->create($this->_apiContext); |
90 | 90 | |
91 | - $redirectUrl = $response->links[1]->href; |
|
91 | + $redirectUrl = $response->links[ 1 ]->href; |
|
92 | 92 | |
93 | 93 | //redirect to Plateform Paypal |
94 | 94 | return Redirect::to($redirectUrl); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $executePayment = $payment->execute($paymentExecution, $this->_apiContext); |
122 | 122 | |
123 | 123 | // Clear the shopping cart, |
124 | - $request->session()->pull('likes', []); |
|
124 | + $request->session()->pull('likes', [ ]); |
|
125 | 125 | |
126 | 126 | //write log |
127 | 127 | Log::info('Un client vient de passer uen commande via Paypal'.$payer_id); |
@@ -28,12 +28,12 @@ |
||
28 | 28 | * |
29 | 29 | * @var array |
30 | 30 | */ |
31 | - protected $fillable = ['name', 'email', 'password']; |
|
31 | + protected $fillable = [ 'name', 'email', 'password' ]; |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * The attributes excluded from the model's JSON form. |
35 | 35 | * |
36 | 36 | * @var array |
37 | 37 | */ |
38 | - protected $hidden = ['password', 'remember_token']; |
|
38 | + protected $hidden = [ 'password', 'remember_token' ]; |
|
39 | 39 | } |
@@ -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 |
@@ -3,10 +3,8 @@ |
||
3 | 3 | namespace App\Console\Commands; |
4 | 4 | |
5 | 5 | use Alaouy\Youtube\Facades\Youtube as Yt; |
6 | -use App\Http\Models\Stats; |
|
7 | 6 | use App\Http\Models\Videos; |
8 | 7 | use Illuminate\Console\Command; |
9 | -use Illuminate\Support\Facades\DB; |
|
10 | 8 | use Illuminate\Support\Facades\Log; |
11 | 9 | |
12 | 10 | /** |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | if (!empty($channel)) { |
52 | 52 | $manager = new \MongoDB\Driver\Manager("mongodb://localhost:27017"); |
53 | 53 | $collection = new \MongoDB\Collection($manager, "laravel.stats"); |
54 | - $collection->deleteMany([]); |
|
54 | + $collection->deleteMany([ ]); |
|
55 | 55 | |
56 | 56 | $collection = new \MongoDB\Collection($manager, "laravel.stats"); |
57 | 57 | $stat = [ |
@@ -70,13 +70,13 @@ discard block |
||
70 | 70 | 'maxResults' => 30, |
71 | 71 | ]; |
72 | 72 | |
73 | - $videos = Yt::searchAdvanced($params, true)['results']; |
|
73 | + $videos = Yt::searchAdvanced($params, true)[ 'results' ]; |
|
74 | 74 | |
75 | 75 | if (!empty($videos)) { |
76 | 76 | $collection = new \MongoDB\Collection($manager, "laravel.videos"); |
77 | - $collection->deleteMany([]); |
|
77 | + $collection->deleteMany([ ]); |
|
78 | 78 | $now = new \DateTime(); |
79 | - $day= $now->getTimestamp(); |
|
79 | + $day = $now->getTimestamp(); |
|
80 | 80 | |
81 | 81 | foreach ($videos as $video) { |
82 | 82 | $collection = new \MongoDB\Collection($manager, "laravel.videos"); |