0
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?

Laravel環境構築を学んでみた

Posted at

最近、自分の実力不足を感じることが多い。
そこで、改めてLaravelやPHPを勉強し直そうと思い立った。
https://readouble.com/laravel/11.x/ja/installation.html

DBやWebさーばーを開発環境からがんばるのはめんどい。
本番で頑張ればよい。
俺はXAMPPを使わせてもらう。

設定ファイル

まずやることとしては環境ファイルの設定
configの中にapp nameやtimezoneがある。
これはログを正確に出すために必要な設定だ。
是非やっておこう。
設定する値としてはこの辺り。

'name' => env('APP_NAME', 'Laravel'),
'timezone' => 'Asia/Tokyo',
'locale' => 'ja',
'fallback_locale' => 'en', 
'cipher' => 'AES-256-CBC', // 暗号化の方式 AESだから共通鍵か

.envも設定。
APPKEYがなければ生成する。

php artisan key:generate

DB接続

DB_CONNECTION=mysql     # 使用するデータベースの種類(例: mysql, sqlite, pgsql)
DB_HOST=127.0.0.1       # データベースサーバーのホスト
DB_PORT=3306            # データベースポート(通常MySQLは3306)
DB_DATABASE=laravel     # データベース名
DB_USERNAME=root        # データベースのユーザー名
DB_PASSWORD=            # データベースのパスワード

今日分からなかったところメモ

php artisan config:cache
Facade?ファサードってなんだ?

0
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
0
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?