1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Laravel8(LaravelVite), Vue3, Nginxでdockerの環境構築する

Posted at

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で任意の型に変換する
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?