1
1

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 5 years have passed since last update.

Laravel+React+Material-UIで作る認証画面テンプレ

Posted at

Laravel+React(Redux+ReactRouter)+Material-UIでソースとデモ画面の公開と使い方など

デモ画面
user / pass : demo@example.com / demodemo
ソース

導入方法

1.Laravel新規プロジェクトのインストール
※composer及びphpの依存ライブラリなどは準備済みとする

$ composer create-project --prefer-dist laravel/laravel lrm

2.上記の差分ソースで上書き

3.プロジェクト全体のアクセス権限を再設定

# chown -R user_name:user_name lrm

4..envファイルにDB及びメールの設定を記入
下記の辺りにそれぞれ値を記入

.env
DB_DATABASE=[DB名]
DB_USERNAME=[DBユーザー名]
DB_PASSWORD=[DBパスワード]

MAIL_PROTOCOL=SMTP_AUTH
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_FROM_ADDRESS=[送信メールアドレス]
MAIL_FROM_NAME=LRM
MAIL_ENCRYPTION=tls
MAIL_USERNAME=[メールサーバーユーザー名]
MAIL_PASSWORD=[メールサーバーパスワード]

5.マイグレーション

$ php artisan migrate

6.JavaScriptの依存解決

$ npm install

7.JavaScriptなどのビルド

$ npm run watch

8.Webサーバーもしくはビルドインサーバーで受付

$ php artisan serve -h 0.0.0.0

※その他Webサーバーの場合の設定に関しては省略

その他.selinuxが有効な場合
storage領域を書き込み許可にする

# chcon -R -t httpd_sys_rw_content_t /usr/share/nginx/html/lrm/storage
1
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?