Docker環境を構築する
- Dockerfile, docker-compose.ymlを作成する
Lravevel (ver.8)
- プロジェクトファイルを作成する
composer create-project laravel/laravel {APP_NAME}
composer require laravel/jetstream
php artisan jetstream:install inertia
npm install --save-dev vite @vitejs/plugin-vue
- LravelViteをプリセットする
npx @preset/cli laravel:vite
上記プリセットコマンドはうまく動かず、、、
手動で行う、、、
LaravelViteはLaravelMixの代わりになります。参考 LaravelVite
DBの要件定義
| Users |
|
| id |
UNSIGNEDBIGINTEGER |
| name |
VARCHAR |
| email |
VARCHAR |
| email_verified_at |
DATETIME |
| password |
VARCHAR |
| remember_token |
BOOLEAN |
| created_at |
TIMESTAMP |
| updated_at |
TIMESTAMP |
| Articles |
|
| id |
UNSIGNEDBIGINTEGER |
| user_id |
UNSIGNEDBIGINTEGER |
| title |
VARCHAR |
| content |
VARCHAR |
| created_at |
TIMESTAMP |
| updated_at |
TIMESTAMP |
| Tags |
|
| id |
UNSIGNEDBIGINTEGER |
| article_id |
UNSIGNEDBIGINTEGER |
| category |
VARCHAR |
| created_at |
TIMESTAMP |
| updated_at |
TIMESTAMP |
| Comments |
|
| id |
UNSIGNEDBIGINTEGER |
| user_id |
UNSIGNEDBIGINTEGER |
| article_id |
UNSIGNEDBIGINTEGER |
| content |
VARCHAR |
| created_at |
TIMESTAMP |
| updated_at |
TIMESTAMP |
| Favorites |
|
| id |
UNSIGNEDBIGINTEGER |
| user_id |
UNSIGNEDBIGINTEGER |
| article_id |
UNSIGNEDBIGINTEGER |
| created_at |
TIMESTAMP |
| updated_at |
TIMESTAMP |
| Comment_Likes |
|
| id |
UNSIGNEDBIGINTEGER |
| user_id |
UNSIGNEDBIGINTEGER |
| comment_id |
UNSIGNEDBIGINTEGER |
| content |
VARCHAR |
| created_at |
TIMESTAMP |
| updated_at |
TIMESTAMP |
| Follow_Users |
|
| id |
UNSIGNEDBIGINTEGER |
| user_id |
UNSIGNEDBIGINTEGER |
| following_user_id |
UNSIGNEDBIGINTEGER |
| created_at |
TIMESTAMP |
| updated_at |
TIMESTAMP |
実装する
query(param)をint型で取りたいがstr型になってしまう
-
('ANY_TYPE')$queryで任意の型に変換する