This file contains 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 | |
namespace UserFrosting; | |
use Illuminate\Database\Capsule\Manager as Capsule; | |
use Illuminate\Database\Eloquent\SoftDeletes; | |
/** | |
* Worker Class | |
* |
This file contains 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 | |
/** | |
* Returns a list of workers. | |
* | |
* Generates a list of workers, optionally paginated, sorted and/or filtered. | |
* This page requires authentication. | |
* Request type: GET | |
*/ | |
public function listWorkers() |
This file contains 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 | |
public function scopeUnionLike($query, $name, $value) | |
{ | |
$columns = $this->getFillable(); | |
if (!in_array($name, $columns)) { | |
throw new \PDOException("Column $name does not exist!"); | |
} | |
$subQuery = $query->toSql(); |
This file contains 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
# .cfg file created by rockbox 00a3658-160517 - http://www.rockbox.org | |
volume: -21 | |
idle poweroff: 1 | |
start directory: /<microSD1>/Music/ | |
autoresume enable: on | |
eq enabled: on | |
dircache: off | |
fmr: /.rockbox/fmpresets/preset01.fmr | |
start in screen: wps |
This file contains 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 | |
use \League\Csv\Writer; | |
$transform = function($collection) { | |
$collection->transform(function ($item) { | |
$item['institution'] = $item['institution']['name']; | |
$item['status'] = $item['status']['status']; | |
if ($item['latest_note']){ | |
$item['latest_note_user'] = $item['latest_note']['user']['user_name']; |
This file contains 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 | |
use Illuminate\Database\Schema\Blueprint; | |
use \Psr\Http\Message\ServerRequestInterface as Request; | |
use \Psr\Http\Message\ResponseInterface as Response; | |
global $app; | |
$app->get('/install', function (Request $request, Response $response, $args) { |
This file contains 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
public function __invoke($request, $response, $next) | |
{ | |
$problems_found = $this->problemChecker(); | |
if ($problems_found){ | |
$response = $this->view->render($response, 'pages/config-errors.html.twig', [ | |
"messages" => $this->results | |
]); | |
} else { | |
$response = $next($request, $response); |
This file contains 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
{ | |
"count": 6, | |
"rows": [ | |
{ | |
"id": 1, | |
"name": "Indiana University Bloomington" | |
}, | |
{ | |
"id": 2, | |
"name": "Ivy Tech Bloomington" |
This file contains 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
public function fatalHandler() { | |
$error = error_get_last(); | |
// Handle fatal errors | |
if( $error !== NULL && $error['type'] == E_ERROR) { | |
$errno = $error["type"]; | |
$errfile = $error["file"]; | |
$errline = $error["line"]; | |
$errstr = $error["message"]; | |
This file contains 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
{ | |
"require": { | |
"php": ">=5.4.0", | |
"rockettheme/toolbox": "1.3.0" | |
} | |
} |