Skip to content

Instantly share code, notes, and snippets.

😎
Always creating something cool

Edward Muya Mwangi muyaedward

😎
Always creating something cool
Block or report user

Report or block muyaedward

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@muyaedward
muyaedward / queue-ensure.php
Created Jul 7, 2018 — forked from mauris/queue-ensure.php
Laravel Artisan Queue Ensurer - Set a cron job to run this file periodically to ensure that Laravel's queue is processing all the time. If the queue listener stopped, restart it!
View queue-ensure.php
<?php
function runCommand ()
{
$command = 'php artisan queue:listen > /dev/null & echo $!';
$number = exec($command);
file_put_contents(__DIR__ . '/queue.pid', $number);
}
if (file_exists(__DIR__ . '/queue.pid')) {
@muyaedward
muyaedward / autocomplete.php
Created Jul 6, 2017 — forked from imranismail/autocomplete.php
Laravel And JqueryUI's Autocomplete Plugin
View autocomplete.php
//SearchController.php
public function autocomplete(){
$term = Input::get('term');
$results = array();
$queries = DB::table('users')
->where('first_name', 'LIKE', '%'.$term.'%')
->orWhere('last_name', 'LIKE', '%'.$term.'%')
->take(5)->get();
You can’t perform that action at this time.