WindowsへのLaravelのインストールとAdminLTE
■xamppのインストール(PHP, MySQL, Apache)
https://into-the-program.com/laravel-create-project/
↑やり方
php.iniとmy.iniの設定をしておく
■composerのインストール
https://www.tairaengineer-note.com/composer-install/
↑やり方
■Laravelのインストール
composer global require laravel/installer
■新しいプロジェクト
composer create-project laravel/laravel test
■/.envでデータベース設定
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=test <- プロジェクト名に変更
DB_USERNAME=root
DB_PASSWORD=
■データベースのマイグレーション(データベース作成)
php artisan migrate
■Webルートへシンボリックリンクを作る
管理者権限でcmdを立ち上げた↑で
mklink /d c:\xampp\htdocs\test c:\web\test\public
↑でページが表示されることを確認
以上が最低限度のLaravelの設定
■node.jsを入れる
ReactNativeの構築方法を参照
https://dev-yakuza.posstree.com/react-native/install-on-windows/
作業は管理者権限(コマンドプロンプト)で行う
Chocolateyをインストール
@”%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe” -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command “iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))” && SET “PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin”
Node.jsをインストール
choco install -y nodejs.install
■認証パッケージ(Breeze)を入れる
composer require laravel/breeze
php artisan breeze:install
Which stack would you like to install?
blade ………………..0
react ………………..1
vue ………………….2
api ………………….3
❯ 0
Would you like to install dark mode support? (yes/no) [no]
❯ yes
Would you prefer Pest tests instead of PHPUnit? (yes/no) [no]
❯ yes
■AdminLTEを突っ込む
composer require jeroennoten/laravel-adminlte
php artisan adminlte:install
php artisan adminlte:status
Checking the resources installation …
7/7 [============================] 100%
All resources checked succesfully!
+——————+——————————————+—————+———-+
| Package Resource | Description | Status | Required |
+——————+——————————————+—————+———-+
| assets | The AdminLTE required assets | Installed | true |
| config | The default package configuration file | Installed | true |
| translations | The default package translations files | Installed | true |
| main_views | The default package main views | Not Installed | false |
| auth_views | The default package authentication views | Installed | false |
| basic_views | The default package basic views | Not Installed | false |
| basic_routes | The package routes | Not Installed | false |
+——————+——————————————+—————+———-+
ならOK、もし足りない部分があれば
php artisan adminlte:install –only=
で追加インストール
