@@ -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 @@ discard block |
||
| 49 | 49 | |
| 50 | 50 | if (!empty($channel)) { |
| 51 | 51 | DB::connection('mongodb')->collection('stats') |
| 52 | - ->where(['origin' => 'Youtube', 'type' => 'infos'])->delete(); |
|
| 52 | + ->where([ 'origin' => 'Youtube', 'type' => 'infos' ])->delete(); |
|
| 53 | 53 | |
| 54 | 54 | $stat = new Stats(); |
| 55 | 55 | $stat->origin = 'Youtube'; |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | 'maxResults' => 30, |
| 66 | 66 | ]; |
| 67 | 67 | |
| 68 | - $videos = Yt::searchAdvanced($params, true)['results']; |
|
| 68 | + $videos = Yt::searchAdvanced($params, true)[ 'results' ]; |
|
| 69 | 69 | |
| 70 | 70 | if (!empty($videos)) { |
| 71 | 71 | DB::connection('mongodb')->collection('videos')->delete(); |
@@ -38,11 +38,11 @@ discard block |
||
| 38 | 38 | */ |
| 39 | 39 | public function handle() |
| 40 | 40 | { |
| 41 | - $infos = \Thujohn\Twitter\Facades\Twitter::getUsersLookup(['screen_name' => 'Symfomany', 'format' => 'php']); |
|
| 41 | + $infos = \Thujohn\Twitter\Facades\Twitter::getUsersLookup([ 'screen_name' => 'Symfomany', 'format' => 'php' ]); |
|
| 42 | 42 | |
| 43 | 43 | if (!empty($infos)) { |
| 44 | 44 | DB::connection('mongodb')->collection('stats') |
| 45 | - ->where(['origin' => 'Twitter', 'type' => 'infos'])->delete(); |
|
| 45 | + ->where([ 'origin' => 'Twitter', 'type' => 'infos' ])->delete(); |
|
| 46 | 46 | |
| 47 | 47 | $stat = new Stats(); |
| 48 | 48 | $stat->origin = 'Twitter'; |
@@ -51,10 +51,10 @@ discard block |
||
| 51 | 51 | $stat->save(); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - $tweets = \Thujohn\Twitter\Facades\Twitter::getDmsOut(['format' => 'php']); |
|
| 54 | + $tweets = \Thujohn\Twitter\Facades\Twitter::getDmsOut([ 'format' => 'php' ]); |
|
| 55 | 55 | if (!empty($tweets)) { |
| 56 | 56 | DB::connection('mongodb')->collection('tweets') |
| 57 | - ->where(['origin' => 'Twitter', 'type' => 'dmsout']) |
|
| 57 | + ->where([ 'origin' => 'Twitter', 'type' => 'dmsout' ]) |
|
| 58 | 58 | ->delete(); |
| 59 | 59 | foreach ($tweets as $tweet) { |
| 60 | 60 | $vi = new Tweets(); |
@@ -65,10 +65,10 @@ discard block |
||
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | 67 | |
| 68 | - $tweets = \Thujohn\Twitter\Facades\Twitter::getFavorites(['format' => 'php']); |
|
| 68 | + $tweets = \Thujohn\Twitter\Facades\Twitter::getFavorites([ 'format' => 'php' ]); |
|
| 69 | 69 | if (!empty($tweets)) { |
| 70 | 70 | DB::connection('mongodb')->collection('tweets') |
| 71 | - ->where(['origin' => 'Twitter', 'type' => 'favorites']) |
|
| 71 | + ->where([ 'origin' => 'Twitter', 'type' => 'favorites' ]) |
|
| 72 | 72 | ->delete(); |
| 73 | 73 | foreach ($tweets as $tweet) { |
| 74 | 74 | $vi = new Tweets(); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | if (!empty($tweets)) { |
| 88 | 88 | DB::connection('mongodb')->collection('tweets') |
| 89 | - ->where(['origin' => 'Twitter', 'type' => 'mentionstimeline']) |
|
| 89 | + ->where([ 'origin' => 'Twitter', 'type' => 'mentionstimeline' ]) |
|
| 90 | 90 | ->delete(); |
| 91 | 91 | foreach ($tweets as $tweet) { |
| 92 | 92 | $vi = new Tweets(); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | |
| 105 | 105 | if (!empty($tweets)) { |
| 106 | 106 | DB::connection('mongodb')->collection('tweets') |
| 107 | - ->where(['origin' => 'Twitter', 'type' => 'hometimeline']) |
|
| 107 | + ->where([ 'origin' => 'Twitter', 'type' => 'hometimeline' ]) |
|
| 108 | 108 | ->delete(); |
| 109 | 109 | foreach ($tweets as $tweet) { |
| 110 | 110 | $vi = new Tweets(); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | |
| 124 | 124 | if (!empty($tweets)) { |
| 125 | 125 | DB::connection('mongodb')->collection('tweets') |
| 126 | - ->where(['origin' => 'Twitter', 'type' => 'usertimeline']) |
|
| 126 | + ->where([ 'origin' => 'Twitter', 'type' => 'usertimeline' ]) |
|
| 127 | 127 | ->delete(); |
| 128 | 128 | foreach ($tweets as $tweet) { |
| 129 | 129 | $vi = new Tweets(); |
@@ -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') |