LoginSignup
0
0

More than 1 year has passed since last update.

Laravel アイコン写真の登録

Posted at

アイコン写真の登録

Jeststream公式リファレンスを参考に、config/jetstream.php で、該当箇所のコメントアウトを外し、アイコン写真を有効化。
https://jetstream.laravel.com/1.x/features/profile-management.html#profile-photos

config/jetstream.php
    'features' => [
        Features::termsAndPrivacyPolicy(),
        Features::profilePhotos(),
        Features::api(),
        Features::teams(['invitations' => true]),
        Features::accountDeletion(),
    ],

写真アップロード後、保存場所:

public\strage\profile-photos

シンボリックリンクをはる。

php artisan storage:link

エラーの場合は
Windows : publicフォルダを開き、storageを右クリック、削除
Linux系 : publicフォルダまで移動して、$ rm -rf storage

※画像がうまく表示されない場合
.envファイルを開いて、APP_URL を修正。

# APP_URL=http://localhost //これをコメントアウト、
APP_URL=http://127.0.0.1:8000 //追加。

本番環境の場合は本番環境のURLに合わせて変更する必要がある。

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