@@ -37,7 +37,7 @@ |
||
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 | } |
@@ -90,7 +90,7 @@ |
||
90 | 90 | |
91 | 91 | $administrator->save(); |
92 | 92 | |
93 | - // Auth::login($administrator); => Autologin |
|
93 | + // Auth::login($administrator); => Autologin |
|
94 | 94 | Session::flash('success', "L'administrateur {$administrator->email} a bien été crée"); |
95 | 95 | return Redirect::route('administrators_index'); |
96 | 96 |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | //1ere methode: Utilisation de MYSQL |
38 | 38 | // marche mais n'est peu souple |
39 | - /* |
|
39 | + /* |
|
40 | 40 | * $results = DB::select(' |
41 | 41 | SELECT ROUND(AVG(TIMESTAMPDIFF(YEAR,dob, NOW()))) as age |
42 | 42 | FROM actors |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | // MAITRISE |
61 | 61 | |
62 | - $results = DB::table('actors') |
|
62 | + $results = DB::table('actors') |
|
63 | 63 | ->select(DB::raw('ROUND(AVG(TIMESTAMPDIFF(YEAR,dob, NOW()))) as age')) |
64 | 64 | ->first(); |
65 | 65 |
@@ -33,6 +33,6 @@ |
||
33 | 33 | protected function schedule(Schedule $schedule) |
34 | 34 | { |
35 | 35 | $schedule->command('email:send [email protected] Boyer') |
36 | - ->everyMinute(); |
|
36 | + ->everyMinute(); |
|
37 | 37 | } |
38 | 38 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $email = $this->argument('email'); |
31 | 31 | $nom = $this->argument('nom'); |
32 | - Mail::send('Emails/welcome', [], function ($m) use ($email, $nom) { |
|
32 | + Mail::send('Emails/welcome', [ ], function($m) use ($email, $nom) { |
|
33 | 33 | $m->from('[email protected]', 'Julien Boyer') |
34 | 34 | ->to($email, $nom) |
35 | 35 | ->subject('Welcome to the site '); |
@@ -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 | } |
@@ -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') |
@@ -27,10 +27,10 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Constructor. |
29 | 29 | */ |
30 | - public function __construct(array $products = []) |
|
30 | + public function __construct(array $products = [ ]) |
|
31 | 31 | { |
32 | 32 | $this->products = $products; |
33 | - $this->promotions = []; |
|
33 | + $this->promotions = [ ]; |
|
34 | 34 | $this->total = 0; |
35 | 35 | } |
36 | 36 | |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | */ |
40 | 40 | public function add(ItemInterface $item) |
41 | 41 | { |
42 | - $this->products[] = $item; |
|
42 | + $this->products[ ] = $item; |
|
43 | 43 | |
44 | 44 | return $this; |
45 | 45 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | public function addItems(Collection $collection) |
51 | 51 | { |
52 | 52 | foreach ($collection as $item) { |
53 | - $this->products[] = $item; |
|
53 | + $this->products[ ] = $item; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | return $this->products; |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | */ |
62 | 62 | public function remove(ItemInterface $item) |
63 | 63 | { |
64 | - $this->products[array_search($item, $this->products)] = $item; |
|
64 | + $this->products[ array_search($item, $this->products) ] = $item; |
|
65 | 65 | |
66 | 66 | return $this; |
67 | 67 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | */ |
72 | 72 | public function clear() |
73 | 73 | { |
74 | - $this->products = []; |
|
74 | + $this->products = [ ]; |
|
75 | 75 | |
76 | 76 | return $this->products; |
77 | 77 | } |
@@ -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 |