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

Laravel開発環境構築

1
Posted at

composerのインストール

Laravelもcomposerを使ってインストールしますので、下記リンクよりダウンロードしインストール
https://getcomposer.org/

1. パッケージ本体インストール

方法1

composer global require "laravel/installer"
laravel new 【作成するプロジェクト名】

方法2

composer create-project laravel/laravel --prefer-dist 【作成するプロジェクト名】

2, JetStreamのインストール手順

Jetstreamマニュアル:https://jetstream.laravel.com/2.x/installation.html

作成したプロジェクトに移動し、composerでJetStreamをインストールします。

composer require laravel/jetstream
php artisan jetstream:install livewire
php artisan jetstream:install livewire --teams

https://laravel-livewire.com/  
または

php artisan jetstream:install inertia
php artisan jetstream:install inertia --teams

https://inertiajs.com/
注意:チーム機能が不要の方は、--teamsはなくてOKです。

3, npm install と npm run dev を実行します。

npm install
npm run dev

4,DB 接続情報設定

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

5、マイグレーションを実行

php artisan migrate

もしくは

php artisan migrate:fresh --seed

6、サーバーをたてて、画面を表示する

php artisan serve

Bootstrap5のインストール

https://rapicro.com/laravel%E3%81%A7%E3%81%AEbootstrap5%E3%81%AE%E5%B0%8E%E5%85%A5/
$ npm -v
でバージョンが表示され、npmがインストールされていることを確認しましょう。

Laravelをインストールしたディレクトリ($ lsしてpackage.jsonなどが表示されるディレクトリ)にて

$ npm install
$ npm install bootstrap
└── node_modules/
    └── bootstrap
        ├── js
        └── scss

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?