Help with SQL commands to interact with a MySQL database
- Mac /usr/local/mysql/bin
- Windows /Program Files/MySQL/MySQL version/bin
- Xampp /xampp/mysql/bin
import "time" | |
type ( | |
ClassLevel struct { | |
ID uint `gorm:"primaryKey"` | |
Number string `json:"number" gorm:"size:70;unique;not null"` | |
Name string `json:"name" form:"name" binding:"required" gorm:"size:60;unique;not null"` | |
LevelPic string `json:"level_pic" form:"level_pic" binding:"required" gorm:"not null"` |
// Go's `math/rand` package provides | |
// [pseudorandom number](http://en.wikipedia.org/wiki/Pseudorandom_number_generator) | |
// generation. | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" |
<?php | |
require_once __DIR__.'/relative/path/to/PrettierPHPFixer/File'; | |
return PhpCsFixer\Config::create() | |
->registerCustomFixers([ | |
(new PrettierPHPFixer()), | |
]) | |
->setRules([ | |
'Prettier/php' => true, |
let isAlreadyFetchingAccessToken = false | |
let subscribers = [] | |
function onAccessTokenFetched(access_token) { | |
subscribers = subscribers.filter(callback => callback(access_token)) | |
} | |
function addSubscriber(callback) { | |
subscribers.push(callback) | |
} |
Modern PHP (by Josh Lockhart) | |
Scaling PHP Apps (by Steve Corona) | |
Modular Programming with PHP 7 (by Branko Ajzele) | |
PHP the right way (by Josh Lockhart and the PHP community) | |
Mastering PHP Design Patterns (by Junade Ali) | |
Design Patterns (by GoF) | |
Head First Design Patterns (by Elisabeth Freeman and Kathy Sierra) | |
Software Architecture Patterns (by Mark Richards) | |
Patterns of Enterprise Application Architecture (by Martin Fowler) | |
The Clean Coder (by Robert Martin) |
hoge.dig
timezone: UTC
_export:
my_path: "/tmp/hoge/csv"
+step1:
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class AddSubReferenceToFormSubmissionsTable extends Migration | |
{ | |
/** | |
* Run the migrations. |
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
trait RestControllerTrait { | |
public function index() { | |
$model = self::MODEL; |