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
/** | |
* Laravel US migration and seed. | |
*/ | |
# command to create migration file | |
php artisan make:migration create_states_table | |
# migration file | |
<?php | |
use Illuminate\Database\Schema\Blueprint; |
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
Q: Where are you online? | |
A: I am in diffferent places. | |
- https://sherwinm.com | |
- Youtube: https://www.youtube.com/channel/UCxxfYRicpclvAjAveEgraYw | |
- Twitter: https://twitter.com/w1n78 or @w1n78 | |
- Instagram: https://www.instagram.com/w1n78 | |
Q: What OS are you using? | |
A: Windows 10, MacOS Catalina, Ubuntu Desktop 19.10 |
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
CREATE SCHEMA `mydb`; | |
USE `mydb`; | |
/** | |
* Student records | |
*/ | |
CREATE TABLE `students` ( | |
`id` INT AUTO_INCREMENT PRIMARY KEY, | |
`name` VARCHAR(100) NOT NULL |
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
mysql: | |
platform: linux/x86_64 | |
image: 'mysql:8.0' | |
ports: | |
- '${FORWARD_DB_PORT:-3306}:3306' | |
environment: | |
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}' | |
MYSQL_DATABASE: '${DB_DATABASE}' | |
MYSQL_USER: '${DB_USERNAME}' | |
MYSQL_PASSWORD: '${DB_PASSWORD}' |