app/Console/Commands/PushPinsToPebble.php
/**
     * Execute the console command.
     *
     * @return mixed
     */
Execute the console command.
@return mixed
Execute the console command . @return mixed
public function handle()
    {
        $talks = Talk::all();
        if ( ! $talks->count()) {
            return false;
        }
        $remindersPushed = [];
        foreach ($talks as $talk) {
            $this->pushTalk($talk, ! in_array($talk->starts_at, $remindersPushed));
            $remindersPushed[] = (string) $talk->starts_at;
        }
    }
public function handle ( ) { $ talks = Talk :: all ( ) ; if ( ! $ talks -> count ( ) ) { return false ; } $ remindersPushed = [ ] ; foreach ( $ talks as $ talk ) { $ this -> pushTalk ( $ talk , ! in_array ( $ talk -> starts_at , $ remindersPushed ) ) ; $ remindersPushed [ ] = ( string ) $ talk -> starts_at ; } }
Execute the console command.
Execute the console command .
// for testing purposes //$talks = Talk::orderBy('starts_at')->skip(11)->take(1)->get();