Help us understand the problem. What is going on with this article?

Laravel環境構築コマンドメモ

アプリの作成

laravelアプリ作成
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
$ chmod a+x /usr/local/bin/composer
$ composer global require “larval/installer”
$ export PATH="$PATH:~/.composer/vendor/bin"
$ source ~/.bash_profile
$ larvel new 〇〇

データベース準備

データベース作成、使用データベース指定
$ export PATH=$PATH:/Applications/MAMP/Library/bin
$ source ~/.bash_profile
$ cd /Applications/MAMP/Library/bin/
$ ./mysql -u root -p
mysql> CREATE DATABASE 〇〇;
mysql> USE 〇〇;

//① あとで使う
mysql> SHOW VARIABLES LIKE '%sock%';

データベース接続

.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=データベース名
DB_USERNAME=ユーザー名
DB_PASSWORD=パスワード
config/database.php
'mysql' => [
            'driver' => 'mysql',
            'host' => env('DB_HOST', '127.0.0.1'),
            'port' => env('DB_PORT', '3306'),
            'database' => env('DB_DATABASE', '.envに記載したデータベース名'),
            'username' => env('DB_USERNAME', '.envに記載したユーザー名'),
            'password' => env('DB_PASSWORD', '.envに記載したパスワード'),
            'unix_socket' => env('DB_SOCKET', '①'),

その他

主要コマンド
$ php artisan serve
$ npm run watch
Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away