Start Laravel project

Create project

composer create-project --prefer-dist laravel/laravel (project) (version)

.gitignore

/.idea

localization

config/app.php

'timezone' => 'Asia/Tokyo',
'locale' => 'ja',

Trusted Proxies

Publish trustedproxy.php

php artisan vendor:publish --provider="Fideloper\Proxy\TrustedProxyServiceProvider"

Edit config/trustedproxy.php

'proxies' => '*',

Install composer packages

Laravel Debugbar

composer require --dev barryvdh/laravel-debugbar

Laravel IDE Helper

composer require --dev barryvdh/laravel-ide-helper doctrine/dbal

PHP_CodeSniffer

composer require --dev squizlabs/php_codesniffer

phpcs.xml

<?xml version="1.0"?>
<ruleset name="Custom">
    <rule ref="PSR2">
        <exclude name="Generic.Files.LineLength"/>
    </rule>
</ruleset>

Install npm packages

webpack, dev-server, hot reloading

npm install --save-dev browser-sync  browser-sync-webpack-plugin

resources/views/layout/app.blade.php

<link href="{{ mix('css/app.css') }}" rel="stylesheet">
<script src="{{ mix('js/app.js') }}"></script>

webpack.mix.js

if (mix.inProduction()) {
    mix.version();
}

install vuex

npm install --save-dev vuex

scaffolding

user authentication

php artisan make:auth

Create initial user (seeds/DatabaseSeeder.php)

    DB::table('users')->delete();
    User::create([
        'name' => 'admin',
        'email' => 'admin@example.jp',
        'password' => bcrypt('admin'),
    ]);