Created
July 3, 2017 11:18
-
-
Save sirawitpra/ea7fd732ce80d7d1f036f607b4d6fe7f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Search | |
{ | |
public function update() | |
{ | |
Partyline::line('Updating the index...'); | |
$entries = Entry::all(); | |
$bar = Partyline::getOutput()->createProgressBar($entries->count()); | |
foreach ($entries as $id => $entry) { | |
$this->index->insert($id, $entry); | |
$bar->advance(); | |
} | |
$bar->finish(); | |
Partyline::line('All done!'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment