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
error: Sending 500 ("Server Error") response: | |
TypeError: sails.getDatastore is not a function | |
at Object.generateToken (/var/www/api/api/services/Oauth2TokenGranterService.js:13:23) | |
at Object.wrapper [as generateToken] (/var/www/api/node_modules/@sailshq/lodash/lib/index.js:3250:19) | |
at Object.token (/var/www/api/api/controllers/AuthController.js:19:28) | |
at wrapper (/var/www/api/node_modules/@sailshq/lodash/lib/index.js:3250:19) | |
at routeTargetFnWrapper (/var/www/api/node_modules/sails/lib/router/bind.js:181:5) | |
at callbacks (/var/www/api/node_modules/@sailshq/express/lib/router/index.js:164:37) | |
at param (/var/www/api/node_modules/@sailshq/express/lib/router/index.js:138:11) | |
at param (/var/www/api/node_modules/@sailshq/express/lib/router/index.js:135:11) |
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 | |
$columnCount = 0; | |
$counter = 0; | |
$scenarios = array_chunk($valuationScenarios, 3); | |
$indicators = array_chunk($valuationScenarioData, 3); | |
@endphp | |
@if (count($scenarios) > 0) | |
@foreach ($scenarios as $scenario) | |
<div class="page"> |
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
@foreach ($scenarios as $scenario) | |
@include('partials.report-scenarios-item', array('headings' => $scenario)) | |
@if (array_key_exists($counter, $indicators)) | |
@include('partials.report-indicator-item', array('indicators' => $indicators[$counter], 'fields' => $indicatorFields)) | |
@endif | |
@php $counter++; | |
@endforeach |
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
select * from `blah`.`DataCapturePropertyInfo` | |
inner join `dataCapturePropertiesField` on | |
`dataCapturePropertiesFieldID` = `dataCapturePropertiesFieldID` | |
where `dataCaptureFormInfoID` = ? | |
$query = $model->join('dataCapturePropertiesField', "dataCapturePropertiesFieldID", "=","dataCapturePropertiesFieldID"); | |
return $query; |
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
select * from `blah`.`DataCapturePropertyInfo` | |
where `dataCaptureFormInfoID` = ? and exists | |
(select * from `blah`.`DataCapturePropertiesFields` | |
where `blah`.`DataCapturePropertyInfo`.`dataCapturePropertiesFieldID` = `blah`.`DataCapturePropertiesFields`.`dataCapturePropertiesFieldID` | |
and `fieldName` = ?) | |
public function apply($model, RepositoryInterface $repository) | |
{ | |
$query = $model->whereHas('dataCapturePropertiesField', function($query) |
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
class DataCapturePropertyInfo extends Eloquent | |
{ | |
protected $table = 'DataCapturePropertyInfo'; | |
protected $connection = 'mysql'; | |
protected $primaryKey = 'dataCapturePropertyID'; | |
public $timestamps = false; |
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
// ERROR: | |
EEEEEEEEEEEEEEEEEIIEEEEIIIPHP Fatal error: Call to a member function input() on null in /vagrant/webroot/vendor/laravel/framework/src/Illuminate/Support/Facades/Input.php on line 21 | |
PHP Stack trace: | |
PHP 1. {main}() /vagrant/webroot/vendor/phpunit/phpunit/phpunit:0 | |
PHP 2. PHPUnit_TextUI_Command::main() /vagrant/webroot/vendor/phpunit/phpunit/phpunit:52 | |
PHP 3. PHPUnit_TextUI_Command->run() /vagrant/webroot/vendor/phpunit/phpunit/src/TextUI/Command.php:116 | |
PHP 4. PHPUnit_TextUI_TestRunner->doRun() /vagrant/webroot/vendor/phpunit/phpunit/src/TextUI/Command.php:186 | |
PHP 5. PHPUnit_Framework_TestSuite->run() /vagrant/webroot/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:517 | |
PHP 6. PHPUnit_Framework_TestSuite->run() /vagrant/webroot/vendor/phpunit/phpunit/src/Framework/TestSuite.php:722 |
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
<form id="propertySave" name="propertySave"> | |
@foreach ($propertyFields as $key => $propertyField) | |
@if ($key % 2 === 0) | |
<div class="row"> | |
@endif | |
<div class="col-md-3"> | |
<div class="form-group"> | |
<label for="{{$propertyField['fieldName']}}">{{$propertyField['fieldLabel']}}</label> | |
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
//Policies | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
module.exports = function(req, res, next) { | |
// User is allowed, proceed to the next policy, |
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
echo "--- Add PHP Apt Repository ---" | |
sudo add-apt-repository ppa:ondrej/php | |
echo "--- Add Ubuntu (for MySQL) Apt Repository ---" | |
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe' | |
echo "-- Update keys --" | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 16126D3A3E5C1192 | |
# sudo apt-key update |