This procedure is tested on Mac OS X 10.12.6
PHP 7.2 installed with Homebrew.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
package main | |
import ( | |
"crypto/sha256" | |
"encoding/json" | |
"fmt" | |
"strconv" | |
"strings" | |
"time" | |
) |
CREATE proc [dbo].[sp_MSforeachtable] | |
@command1 nvarchar(2000), @replacechar nchar(1) = N'?', @command2 nvarchar(2000) = null, | |
@command3 nvarchar(2000) = null, @whereand nvarchar(2000) = null, | |
@precommand nvarchar(2000) = null, @postcommand nvarchar(2000) = null | |
AS | |
declare @mscat nvarchar(12) | |
select @mscat = ltrim(str(convert(int, 0x0002))) | |
if (@precommand is not null) | |
exec(@precommand) |
<?php | |
return Symfony\CS\Config\Config::create() | |
->level(Symfony\CS\FixerInterface::SYMFONY_LEVEL) | |
->fixers([ | |
'short_array_syntax', | |
'ordered_use', | |
]) | |
; |
# PHP | |
# Test and package your PHP project. | |
# Add steps that run tests, save build artifacts, deploy, and more: | |
# https://docs.microsoft.com/azure/devops/pipelines/languages/php | |
trigger: | |
- develop | |
pool: | |
vmImage: 'Ubuntu-16.04' |
Model:: | |
/*Select*/ | |
select('col1','col2') | |
->select(array('col1','col2')) | |
->select(DB::raw('businesses.*, COUNT(reviews.id) as no_of_ratings, IFNULL(sum(reviews.score),0) as rating')) | |
->addSelect('col3','col4') | |
->distinct() // distinct select | |
/*From*/ |
This procedure is tested on Mac OS X 10.12.6
PHP 7.2 installed with Homebrew.
Download the following files from Oracle website (yes, you need to create an account and accept terms):
<?php | |
namespace App\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Support\Facades\Route; | |
use Illuminate\Routing\Route as Router; | |
class RouterServiceProvider extends ServiceProvider | |
{ |
This is a 2-part technique to share named routes between Laravel and Javascript. It uses a custom artisan
command to export your named routes to JSON, and a Javascript route()
helper to lookup the route and fill in any parameters. Written for Laravel 5.3; not tested in 5.4.
Copy RouteJson.php
into your app as app/Console/Commands/RouteJson.php
phpenv local 7.0 | |
echo "memory_limit = 512M" >> /home/rof/.phpenv/versions/$(phpenv version-name)/etc/php.ini | |
# install dependencies | |
COMPOSER_HOME=${HOME}/cache/composer | |
composer install --prefer-dist --no-interaction | |
# set up environment variables | |
touch .env | |
echo "APP_ENV=testing" >> .env | |
echo "APP_DEBUG=true" >> .env | |
echo "APP_KEY=base64:sQPFP80eWJQGo0SDPc+M2Tib+GLUocRYRw4RLsfM27I=" >> .env |
[ | |
{ | |
"name": "New Years Day", | |
"date": "01/01/2017", | |
"states": [ | |
"Kuala Lumpur", | |
"Labuan", | |
"Malacca", | |
"Negeri Sembilan", | |
"Pahang", |