Giter Club home page Giter Club logo

study-laravel's Introduction

study-laravel

Laravel学習用のプロジェクトです。

Forkして使ってください。

開発環境の構築

1. プロジェクトのFork

GitHubからこのプロジェクトをForkしてください。

2. ソースコードの取得

1でForkしたプロジェクトのソースコードを取得します。

$ cd ~/your/workspace
$ git clone [email protected]:your-github-account/study-laravel.git

3. Laradockのダウンロード

$ cd ~/your/workspace/study-laravel
$ git submodule init
$ git submodule update

4. Laradockの.envのコピー

$ cd ~/your/workspace/study-laravel
$ ./scripts/setup.sh

5. Dockerの起動

$ cd ~/your/workspace/study-laravel/laradock-study_laravel
$ docker-compose up -d nginx mysql

6. PHPパッケージのインストール

$ cd ~/your/workspace/study-laravel/laradock-study_laravel
$ docker-compose exec --user=laradock workspace bash
# composer install

7. Laravelの.envのコピー

$ cd ~/your/workspace/study-laravel/laradock-study_laravel
$ docker-compose exec --user=laradock workspace bash
# cp .env.example .env

8. アプリケーションキーの設定

$ cd ~/your/workspace/study-laravel/laradock-study_laravel
$ docker-compose exec --user=laradock workspace bash
# php artisan key:generate

9. データベース情報の設定

7でコピーした.envを編集しデータベース情報を設定してください。

変更前:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret

変更後:

DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=study_laravel
DB_USERNAME=study_laravel
DB_PASSWORD=study_laravel

使用方法

WEBサイトへのアクセス

http://localhost/

作業環境へのアクセス

コマンドの実行(Composer、Artisan、PHPUnit等)はworkspaceコンテナの中で行ってください。

$ cd ~/your/workspace/study-laravel/laradock-study_laravel
$ docker-compose exec --user=laradock workspace bash

DBへのアクセス

$ cd ~/your/workspace/study-laravel/laradock-study_laravel
$ docker-compose exec mysql mysql -u study_laravel -pstudy_laravel study_laravel

study-laravel's People

Contributors

ngmy avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.