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
| version: '2' | |
| services: | |
| app: | |
| image: dyoshikawa/laravel:php-72 | |
| volumes: | |
| - .:/work | |
| ports: | |
| - 8000:8000 | |
| tty: true |
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
| from pathlib import Path | |
| import os | |
| def replace_all_file(files, class_name): | |
| for file_path in files: | |
| if ".git/" in str(file_path): | |
| continue | |
| if "volumes/" in str(file_path): | |
| continue |
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
| from pathlib import Path | |
| import os | |
| def replace_all_file(files, model_name): | |
| for file_path in files: | |
| if ".git/" in str(file_path): | |
| continue | |
| if "volumes/" in str(file_path): | |
| continue |
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
| from pathlib import Path | |
| import os | |
| def replace_all_file(files, model_name): | |
| for file_path in files: | |
| if ".git/" in str(file_path): | |
| continue | |
| if "volumes/" in str(file_path): | |
| continue |
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
| <template> | |
| <div> | |
| {{ yearMonth }} | |
| <button @click="goPrevMonth">prev</button> | |
| <button @click="goNextMonth">next</button> | |
| <table> | |
| <tr> | |
| <th>日</th> |
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
| >>> $user = User::find(5) | |
| => App\User {#2952 | |
| id: 5, | |
| name: "test", | |
| created_at: "2019-02-26 20:12:50", | |
| updated_at: "2019-02-26 20:12:50", | |
| } | |
| >>> $user | |
| => App\User {#2952 | |
| id: 5, |
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
| $user = User::find($id); // ユーザを取得 | |
| $posts = $user->posts()->get(); // ユーザが持つ投稿一覧を取得 |
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
| { | |
| "name": "express-ts-parcel-example", | |
| "version": "1.0.0", | |
| "main": "index.js", | |
| "license": "MIT", | |
| "scripts": { | |
| "dev": "parcel --target node server.ts", | |
| "build": "parcel build --target node server.ts", | |
| "start": "node dist/server.js", | |
| "type-check": "tsc --noEmit" |
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
| import express, { Request, Response } from "express"; | |
| const app = express(); | |
| app.get("/", (_req: Request, res: Response) => res.send("Hello World!")); | |
| app.listen(3000, () => console.log("Example app listening on port 3000!")); |
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
| version: 2 | |
| jobs: | |
| build: | |
| docker: | |
| - image: dyoshikawa/laravel:latest | |
| environment: | |
| APP_ENV: local | |
| APP_KEY: base64:jRMWhl8pTIVapnvHyxOdrA6jOhFSKjj6zGhmx0NS6AM= | |
| DB_CONNECTION: mysql | |
| DB_USERNAME: root |