ããªããHabraã³ãã¥ããã£ããããŠLaravelã®äžçãžã®æ°åè
ãè¿ããŸãïŒ
ãã®èšäºã¯ã©ã©ã®åéã®åå¿è
åãã«æžãããŠããããã¬ãŒã ã¯ãŒã¯ã®éçºã®åæ段éã§åœ¹ç«ã€ããã«èšèšãããŠããŸãã
ãã®èšäºã§ã¯ãããã°ãåºæ¬çãªãããã±ãŒãžãæ€èšããŸãããããããªããšããããžã§ã¯ãã«åãçµãããšãå人çã«å°é£ã«ãªããŸãã
ãããã¯ã«èå³ããããªããç«ããé¡ãããŸãã
1.ã·ã¹ãã èŠä»¶
Laravel 5.3ãã¬ãŒã ã¯ãŒã¯ã«ã¯ä»¥äžãå¿
èŠã§ãã
- PHP> = 5.6.4
- OpenSSL PHPæ¡åŒµ
- PDO PHPæ¡åŒµ
- Mbstring PHPæ¡åŒµ
- ããŒã¯ãã€ã¶ãŒPHPæ¡åŒµ
ãã®ã³ã³ããŒãã³ãã®ã»ããã¯ãã¹ãŠã
OpenServer for Windowsã«ååšããŸãã
ã¯ãããã¬ãŒã ã¯ãŒã¯ã«ã¯ä»®æ³ãã·ã³ãšããŠ
Homesteadããããšèª°ããèšãã§ãããã éœåã®è¯ã人ã«ã ããçãããŸãã å人çã«ã¯ãWindowsã§ã®OpenServerã¯äŸ¿å©ã§ãã
Composerãš
NodeJSãå¿
èŠã§ãã
2.ã€ã³ã¹ããŒã«
2.1ã OpenServerãæ§æãã
ã¡ã€ã³
[å
šè¬]ã¿ãã§ããµãŒããŒã®èµ·åãšç®¡çè
ã¢ã«ãŠã³ãã®èŠä»¶ãæå¹ã«ããŸãã hostsãã¡ã€ã«ã䜿çšãããšãã¯ã2çªç®ãå¿
èŠã§ãã
ãµãŒããŒ
ãã®ã¿ãã§ãä»®æ³ãã£ã¹ã¯èšå®ããèªåæ€åºããŒãºãã«èšå®ãããã«ã¹ã¿ã ãã¹+ Winãã¹ãã§Pathå€æ°ã®äœ¿çšãèšå®ããŸãã
ãå€éšã¢ã¯ã»ã¹ãããµãŒããŒãä¿è·ããããšãLANãã誰ãç§ãã¡ã«ããã¿ã€ããªãããã«ããŠããŸãã
ãããŠ...ãã¹ãŠïŒæ¬¡ã®ã¿ãã«ç§»åããŸãã
ã¢ãžã¥ãŒã«
ç§ã®ç®çã®ããã«ã次ã®ã¢ãžã¥ãŒã«ã®ãã³ãã«ã䜿çšããŸãã
- HTTPïŒApache-PHP 7 x64-NGINX 1.10
- PHPïŒPHP 7 x64
- PostgreSQL 9.5 x64
- Redis 3.0
æ®ãã®é
ç®ã¯ã䜿çšããªããã瀺ããŸãã
FTPãµãŒããŒ
ãã®ã¿ãã§ãäžèŠãªå Žåã¯ãããã«FTPãµãŒããŒã®èµ·åããªãã«ããŸãã
éµäŸ¿
ããã©ã«ãã§ã¯ããã¹ãŠã®ã¡ãã»ãŒãžã¯ããŒã«ã«ã«ãã©ã«ãã«ä¿åãããŸãããããã°ãæŠéã¢ãŒããã§ç¢ºèªããæ¹ã䟿å©ã§ãã
ããã§ãSMTPçµç±ã®éä¿¡æ¹æ³ãèšå®ããŠããããµãŒããŒãããŒããã¡ãŒã«éä¿¡è
ããŠãŒã¶ãŒåïŒãã°ã€ã³ïŒãã¢ã«ãŠã³ãããã®ãã¹ã¯ãŒãããèªåãã§ã®æå·åãèšå®ããŸãã
ãããŠ...å
ã«é²ã¿ãŸãïŒ
ãã¡ã€ã³
æ¯åæ°ãããµã€ããæåã§è¿œå ããªãããã«ããã«ã¯ãããã¡ã€ã³ç®¡çããªã¹ãã§ãæå+èªåæ€çŽ¢ããéžæããå³åŽã«ããããªãã¯ããæå®ããŸããå®è¡å¯èœãã¡ã€ã«ãå«ãŸããŠããããã§ãã
ã¿ã¹ã¯ã¹ã±ãžã¥ãŒã©ïŒCronïŒ
ç§ã¯ä»äºã§
Cronã䜿çšããŠããŸãã®ã§ãåæ§ã«èšå®ããŸãããã ãµã€ãããšã«ãç¬èªã®ã³ãã³ããè¿œå ããå¿
èŠããããšèšããŸãã
ãã®ããããã¹ãŠã®æéå€ã«ã·ã³ãã«ãã¢ã¹ã¿ãªã¹ã¯ãïŒ*ïŒãé
眮ããåã«ãå®è¡ãããŸãïŒ
php "D:\OpenServer\domains\mysite.com\artisan" schedule:run
ãããžã§ã¯ãå
ã®è·äººãã¡ã€ã«ãžã®ãã«ãã¹ã瀺ããŸãã
詳现ä»ãã®ã¹ã¯ãªãŒã³ã·ã§ãã 2.2ã Laravel 5.3ãã€ã³ã¹ããŒã«ãã
ãã¬ãŒã ã¯ãŒã¯ã®å±éãéå§ããåã«ã
Composerããã³
NodeJSãŠãŒãã£ãªãã£ãã³ã³ãã¥ãŒã¿ãŒã«ã€ã³ã¹ããŒã«ãããŠããããšã確èªããŠãã ããã 2çªç®ã§ã¯ããã©ã³ãã®ããŒãžã§ã³6ã䜿çšããŸãããããã¯éèŠã§ã¯ãããŸããã
ãã¬ãŒã ã¯ãŒã¯ãã€ã³ã¹ããŒã«ããåã«ã
hirak / prestissimoããã±ãŒãžã䜿çšããããšããå§ãã
ãŸã ãããã«ããããã¬ãŒã ã¯ãŒã¯ãåæã«ã€ã³ã¹ããŒã«/æŽæ°ãããšãã«è€æ°ã®ããã±ãŒãžãããŠã³ããŒãã§ããŸãã ããããªãå Žåãã€ã³ã¹ããŒã«/æŽæ°ããã»ã¹ã¯ç·åœ¢ã§ããã€ãŸãã1ã€ã®ããã±ãŒãžãèŠæ±ããå¿çãåŸ
ã£ãŠããããŠã³ããŒããïŒãµãŒããŒããã®å¿çãæåããå ŽåïŒã次ãžé²ã¿ãŸãã ããã±ãŒãž `hirak / prestissimo`ã䜿çšãããšãå¿
èŠãªãã¹ãŠã®ããã±ãŒãžãåæã«ããŠã³ããŒããããã®åŸã€ã³ã¹ããŒã«ãéå§ã§ããŸãã
ããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ãã³ã³ãœãŒã«ã§å®è¡ããŸãïŒ
composer global require "hirak/prestissimo:^0.3"
ãããã£ãŠãã³ãã³ãã³ã³ãœãŒã«ãéãã次ã®ããã«å
¥åããŸãã
composer global require "laravel/installer"
ããã¯ãæåã®ã€ã³ã¹ããŒã«æã«äžåºŠã ãå®è¡ããå¿
èŠããããŸãã åŸç¶ã®ã¢ããªã±ãŒã·ã§ã³ããããã€ãããšãããã®ã³ãã³ãã¯ã¹ãããããŸãã
ã€ã³ã¹ããŒã©ãŒãã°ããŒãã«ã³ã³ããŒã¶ãŒãªããžããªã«ããŠã³ããŒãããåŸãLaravel 5.3ãã¬ãŒã ã¯ãŒã¯èªäœãããŠã³ããŒãããå¿
èŠããããŸãã ãããè¡ãã«ã¯ã2ã€ã®ããŒã ããéžæã§ããŸãã
laravel new blog composer create-project --prefer-dist laravel/laravel blog
圌ãã¯äž¡æ¹ãšãåãã¢ã¯ã·ã§ã³ãå®è¡ããŸãããéãã¯ãã ...ã§ãã®ã§ãéããäœã§ãããã¯æããã§ãïŒ
å¯äžã®æ³šæç¹ã¯ãæåã®ã€ã³ã¹ããŒã«äžã«ãã³ã³ããŒã¶ã®å®è¡å¯èœãã¡ã€ã«ãžã®ãã¹ã¯ã€ã³ã¹ããŒã«æã«èªåçã«ç»é²ãããŸãããlaravelã³ãã³ããžã®ãã¹ã¯ç»é²ãããªãããšã§ãã å人çã«ã¯ããlaravelãã³ãã³ãã䜿çšãããšäŸ¿å©ãªã®ã§ãããã®ã³ã³ãã¥ãŒã¿ãŒãã«é²ã¿ãŸãïŒWindows 10ã䜿çšããŠããããããã¹ãŠã®æé ã説æããŸãïŒã
ããã©ã¡ãŒã¿ãŒããéããæ€çŽ¢è¡ã«ãã·ã¹ãã ããšå
¥åãã次ã«ããã©ã¡ãŒã¿ãŒãå€æŽããšå
¥åããŸãã [ã·ã¹ãã ã®ããããã£]ãŠã£ã³ããŠã§ã[詳现èšå®]ã¿ãã«ç§»åãã[ç°å¢å€æ°]ãã¿ã³ãã¯ãªãã¯ããŸãã
éãããŠã£ã³ããŠã§ããŠãŒã¶ãŒã®ããŸããŸãªç°å¢ã§ã `PATH`ã®å€æŽãéããŸããããã§ãå®è¡å¯èœãã¡ã€ã«ã®laravel`ãã¡ã€ã«ã«ãã¹ãè¿œå ããŸãã ãcïŒ\ Users \ Developer \ AppData \ Roaming \ Composer \ vendor \ bin \ `ãã©ã«ãã«ãããŸãããDeveloperãã¯ã¢ã«ãŠã³ãïŒãŠãŒã¶ãŒïŒã®ååã§ãã
詳现ä»ãã®ã¹ã¯ãªãŒã³ã·ã§ãã ãã®ããã次ã®ããããã®ã³ãã³ããå®è¡ããŸãã
laravel new blog composer create-project --prefer-dist laravel/laravel blog
ãã¬ãŒã ã¯ãŒã¯ã¯ããã°ãã©ã«ããŒã«ããŠã³ããŒããããŸãã ãµã€ãã®ã¢ãã¬ã¹ãããã«ç»é²ã§ããŸãã ãããè¡ãã«ã¯ãã³ãã³ããå€æŽããŸãã
laravel new mysite.dev composer create-project --prefer-dist laravel/laravel mysite.dev
ãã®åŸããOpenServerããåèµ·åããŠããæ°ãããµã€ãããèŠããããã«ããå¿
èŠããããŸãã
ããã ãã§ã ã€ã³ã¹ããŒã«ãå®äºãã次ã®æé ã«é²ã¿ãŸãã
3. Laravel 5.3ã®æ§æ
3.1ã .gitignore
å€ãã®äººããªããžããªã䜿çšããŠãããããããã« `.gitignore`ãã¡ã€ã«ã«ç§»åããŠã次ã®åœ¢åŒã«ãªããŸãã
.env /vendor /node_modules /public/storage /.idea Homestead.yaml Homestead.json *npm-debug.log*
ã€ãŸããnode_modulesããã®æ
å ±ã®ã¢ã³ããŒããšããpublic / buildãããã³ãã®ä»ã®ãã·ã¹ãã ããã¡ã€ã«ããã®èªåçæãã¡ã€ã«ã®çŠæ¢ã«å«ããŸãã
`vendor`ããã³` node_modules`ãã©ã«ããŒã®ã³ã³ãã³ãã¯èªåçã«ããŒããããŸã
3.2ã ç°å¢ïŒ.envïŒ
ããã§ã¯ãã¹ãŠãéåžžã«ç°¡åã§ãã
APP_ENV=local APP_DEBUG=true DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_DATABASE=my_database DB_USERNAME=root DB_PASSWORD=
`DB_CONNECTION`-èšå®ããã®å¯Ÿå¿ããããŒã¿ããŒã¹ã®æ¥ç¶å` config / databases.php >> conntections`ã
PostgreSQLã®å Žåã¯ãpgsqlããMySQL / MariaDBã®å Žåã¯ãmysqlããæå®ããŸãã
ãŸããããŒã¿ããŒã¹ã«äœ¿çšãããããŒããæå®ããããšãå¿ããªãã§ãã ããã ããŒãçªå·ã¯ãããµãŒããŒãã¿ãã®ãOpenServerãã§è¡šç€ºã§ããŸãã
ãã®åã«ã `OpenServer`æ§é ã®` PgAdmin III`ã¢ããªã±ãŒã·ã§ã³ã䜿çšããŠãããŒã¿ããŒã¹ãè¿œå ãã `.env`ãã¡ã€ã«ã«ãã©ã¡ãŒã¿ãŒãæžã蟌ãå¿
èŠããããŸãã
3.3ã ããã±ãŒãž
åäœããã«ã¯ã次ã®ããã±ãŒãžãå¿
èŠã§ãã
Laravelã®äŸå€
ãã®ããã±ãŒãžã¯ããããã°ã¢ãŒãã§ã®éçºäžã«çºçãããšã©ãŒã«é¢ããæ
å ±ã®åºåãæ¹åããããã«å¿
èŠã§ãã
ã€ã³ã¹ããŒã«ã¯ç°¡åã§ããã³ã³ãœãŒã«ã§æ¬¡ã®ã³ãã³ããå®è¡ããŸãã
composer require graham-campbell/exceptions composer require filp/whoops --dev
次ã«ããã¡ã€ã« `config / app.php`ã§ããµãŒãã¹ãããã€ããŒ` GrahamCampbell \ Exceptions \ ExceptionsServiceProvider :: class`ã `providers`ãããã¯ã«è¿œå ããŸãã
ãã®åŸããuseããããã¯å
ã®ãã¡ã€ã«ãApp \ Exceptions \ Handler.phpãã§ããuse Illuminate \ Foundation \ Exceptions \ Handler as ExceptionHandler;ãããuse GrahamCampbell \ Exceptions \ NewExceptionHandler as ExceptionHandler;ãã«å€æŽããŸã
graham-campbell / exceptionsã®è©³çŽ°ãã芧ãã ããã
ã¹ã¯ãªãŒã³ã·ã§ãã Laravelãããã°ããŒ
ã³ãã³ããå®è¡ããŸãïŒ
composer require barryvdh/laravel-debugbar
次ã«ããã¡ã€ã« `config / app.php`ã§ããµãŒãã¹ãããã€ããŒ` Barryvdh \ Debugbar \ ServiceProvider ::ã¯ã©ã¹ã `ãããã€ããŒ`ãããã¯ã«è¿œå ããŸãã
barryvdh / laravel-debugbarããã±ãŒãžã®è©³çŽ°ãã芧ãã ããã
ã¹ã¯ãªãŒã³ã·ã§ãã Laravel 5 IDEãã«ããŒãžã§ãã¬ãŒã¿ãŒ
ã³ãã³ãã亀äºã«å®è¡ããŸãã
composer require barryvdh/laravel-ide-helper composer require doctrine/dbal
次ã«ã `config / app.php`ãã¡ã€ã«ã§ããµãŒãã¹ãããã€ããŒã®Barryvdh \ LaravelIdeHelper \ IdeHelperServiceProvider ::ã¯ã©ã¹ã`ãããã€ã㌠`ãããã¯ã«è¿œå ããŸãã
ãã®åŸãã«ãŒããã£ã¬ã¯ããªããã®ãã¡ã€ã«composer.jsonã®ããã㯠`scripts / post-update-cmd`ã¯æ¬¡ã®ããã«çž®å°ãããŸãïŒ
{ "scripts": { "post-update-cmd": [ "Illuminate\\Foundation\\ComposerScripts::postUpdate", "php artisan ide-helper:generate", "php artisan ide-helper:meta", "php artisan optimize" ] } }
barryvdh / laravel-ide-helperããã±ãŒãžã®è©³çŽ°ãã芧ãã ããã
Laravel 5æ¡åŒµãžã§ãã¬ãŒã¿ãŒ
å人çã«ã¯ããphp artisan makeïŒmigrationïŒschemaããšãã1ã€ã®ã³ãã³ãã䜿çšããŠç§»è¡ãšã¢ãã«ãäœæãããšäŸ¿å©ã§ãã
ããšãã°ããã£ãŒã«ã `slug`ã` title`ã `content`ãæã€ããŒãã«` news`ãäœæããå¿
èŠããããŸãã
php artisan make:migration:schema create_news_table --schema="slug:string:unique, title:string:unique, content:text"
Laravel 5.3ã§ããã±ãŒãžãã€ã³ã¹ããŒã«ããã«ã¯ã次ã®ã³ãã³ããå®è¡ããå¿
èŠããããŸãã
composer require laracasts/generators --dev
次ã«ããã¡ã€ã« `config / app.php`ã«ãµãŒãã¹ãããã€ããŒ` Laracasts \ Generators \ GeneratorsServiceProvider ::ã¯ã©ã¹ã `ãããã€ããŒ`ãããã¯ã«è¿œå ããŸãã
laracasts / generatorsããã±ãŒãžã®è©³çŽ°ãã芧ãã ããã
ããã±ãŒãžæ§æã®çµäº
ãã¹ãŠã®ããã±ãŒãžãã€ã³ã¹ããŒã«ããããã³ã³ãœãŒã«ã§å®è¡ããŸãã
php artisan vendor:publish composer update
ããã±ãŒãžãæ±ãã
次ã¯
Elixirã§ãã
4.ãšãªãã·ã«
4.1 Elixirã®ã€ã³ã¹ããŒã«
ãããžã§ã¯ããã©ã«ããŒã«ããã³ã³ãœãŒã«ã§ã次ã®ã³ãã³ããé çªã«å®è¡ããŸãã
npm install --global gulp-cli npm install --no-bin-links
Laravel 5.2ã®æ代ããã5.3ã§
ããã«äœ¿çšã§ãã
VueJsã䜿çšãããããå¿
èŠãªãã¹ãŠã®ããã±ãŒãžã«
ãæ¥ç¶ããŸãã
npm rebuild node-sass npm install hammerjs vue-async-data materialize-css
泚ïŒãvueãããvue-resourceããªã©ã®ã³ã³ããŒãã³ãã¯ãããã«äœ¿çšã§ããããããå«ãŸããŠããŸããã
次ã«ããã¡ã€ã« `resources / asset / js / bootstrap.js`ã®line`ãŠã£ã³ããŠã®åŸã$ = Window.jQuery = requireïŒ 'jquery'ïŒ;` CSS CSSãã¬ãŒã ã¯ãŒã¯Twitter BootstrapïŒ `requireïŒ 'bootstrap-sass' ïŒ; `ïŒã ãã®äŸã§ã¯ãMaterializeCSSã§ã¯ãªããMaterializeCSSã䜿çšããŠããããããrequireïŒ '../ vendor / materialize-css / js / bin / materialize.min'ïŒ;ãã«çœ®ãæããŸãã
次ã«ãèŠã€ããŸãïŒ
window.Vue = requireïŒ 'vue'ïŒ;
requireïŒ 'vue-resource'ïŒ;
æãèµ·ãããŠãã ããïŒ
window.Vue = requireïŒ 'vue'ïŒ;
var VueResource = requireïŒ 'vue-resource'ïŒ;
var VueAsyncData = requireïŒ 'vue-async-data'ïŒ;
Vue.useïŒVueResourceïŒ;
Vue.useïŒVueAsyncDataïŒ;
4.2 MaterializeCSS
ç§ã¯å人çã«ã¯ããçŸä»£çã«èŠããã®ã§ãããªãåã«Twitter Bootstrap CSSãã¬ãŒã ã¯ãŒã¯ããåãæ¿ããŠ
MaterializeCSSã® ããããªã¢ã«ããã¶ã€ã³ãæ¡çšããŸããã
ãããã€ã³ã¹ããŒã«ããã«ã¯ã次ã®ã³ãã³ããå®è¡ããå¿
èŠããããŸãã
npm install materialize-css
次ã«ãMaterializeCSSã䜿çšãããã³ãã¬ãŒãã®ãã©ã³ã `Material Icon`ãæ¥ç¶ããå¿
èŠããããŸãã
<!DOCTYPE html> <html> <head> <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> </head> <body> // </body> </html>
4.3 gulpfile.jsã®æ§æ
éçºæãéåžžã«äŸ¿å©ãªãã©ãŠã¶ããŒã«ã¯ã³ã³ãœãŒã«ã§ãã åé¡ã®ããè¡ã®ãã¯ã€ãã¯æ€çŽ¢ããæŽçããã«ã¯ããã¡ã€ã«ãgulpfile.jsãã«è¡ãelixir.config.sourcemaps = true;ããè¿œå ããŸããããã¯ããœãŒã¹ããããã®çæãæ
åœããŸãã
MaterializeCSSãšSASSã䜿çšããå Žåã次ã®ããã«ãªããŸãã
äœæ¥gulpfile.js const elixir = require('laravel-elixir'); require('laravel-elixir-vue'); elixir.config.sourcemaps = true; elixir(mix => { var assets = 'resources/assets/', node_modules = '../../../node_modules/'; mix .sass('app.scss', 'public/css/app.css') .copy(assets + 'images', 'public/images') .copy(node_modules + 'materialize-css/fonts', 'public/build/fonts') .webpack('app.js') .version( [ 'css/app.css', 'js/app.js' ] ); } );
ããããã®æ¹æ³ãå¿
èŠãªçç±ãå®å
šã«èª¬æããå¿
èŠã¯ãªããšæããŸãã ããã«ããã¥ã¡ã³ããžã®ãªã³ã¯ã
æ®ããŠãã ããã
4.3ãªãœãŒã¹ïŒSASS
ãã®ãããžã§ã¯ããŸãã¯ãã®ãããžã§ã¯ããéçºããããã«MaterializeCSSãã¬ãŒã ã¯ãŒã¯ã®ãã¹ãŠã®ã³ã³ããŒãã³ããå¿
èŠãªããã§ã¯ãªãããããã¡ã€ã« `resources / asset / sass / app.scss`ã«ããããžã®ãªã³ã¯ãè¿œå ããŸãã
app.scssã®ã³ã³ãã³ã @charset "UTF-8"; // Mixins // @import "../../../node_modules/materialize-css/sass/components/prefixer"; @import "../../../node_modules/materialize-css/sass/components/mixins"; @import "../../../node_modules/materialize-css/sass/components/color"; // Variables; @import "../../../node_modules/materialize-css/sass/components/variables"; // Reset @import "../../../node_modules/materialize-css/sass/components/normalize"; // components @import "../../../node_modules/materialize-css/sass/components/global"; @import "../../../node_modules/materialize-css/sass/components/icons-material-design"; @import "../../../node_modules/materialize-css/sass/components/grid"; @import "../../../node_modules/materialize-css/sass/components/navbar"; @import "../../../node_modules/materialize-css/sass/components/roboto"; @import "../../../node_modules/materialize-css/sass/components/typography"; @import "../../../node_modules/materialize-css/sass/components/cards"; @import "../../../node_modules/materialize-css/sass/components/toast"; @import "../../../node_modules/materialize-css/sass/components/tabs"; @import "../../../node_modules/materialize-css/sass/components/tooltip"; @import "../../../node_modules/materialize-css/sass/components/buttons"; @import "../../../node_modules/materialize-css/sass/components/dropdown"; @import "../../../node_modules/materialize-css/sass/components/waves"; @import "../../../node_modules/materialize-css/sass/components/modal"; @import "../../../node_modules/materialize-css/sass/components/collapsible"; @import "../../../node_modules/materialize-css/sass/components/chips"; @import "../../../node_modules/materialize-css/sass/components/materialbox"; @import "../../../node_modules/materialize-css/sass/components/forms/forms"; @import "../../../node_modules/materialize-css/sass/components/table_of_contents"; @import "../../../node_modules/materialize-css/sass/components/sideNav"; @import "../../../node_modules/materialize-css/sass/components/preloader"; @import "../../../node_modules/materialize-css/sass/components/slider"; @import "../../../node_modules/materialize-css/sass/components/carousel"; @import "../../../node_modules/materialize-css/sass/components/date_picker/default"; @import "../../../node_modules/materialize-css/sass/components/date_picker/default.date"; @import "../../../node_modules/materialize-css/sass/components/date_picker/default.time";
4.3ãªãœãŒã¹ïŒãã¥ãŒ
ãããã£ãŠãåã®æé ã®éçšã§ãã³ã³ãœãŒã«ã§ãgulpãã³ãã³ããå®è¡ããããšã§ãåºåã«2ã€ã®ãã¡ã€ã«ãapp.jsããšãapp.cssããååŸããŸãã ããŒãžã§ã³ç®¡çã·ã¹ãã ã䜿çšãããã®ã§ïŒãã©ãŠã¶ã«ãããªãœãŒã¹ã®ãã£ãã·ã³ã°ã«ã€ããŠæããªãã§ãã ããïŒïŒããã³ãã¬ãŒã `resources / views / layouts / app.blade.php`ã§ã以äžãèšè¿°ããå¿
èŠããããŸãã
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> {{----}} <meta name="csrf-token" content="{{ csrf_token() }}"> {{----}} <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> {{----}} <link href="{{ elixir('css/app.css') }}" rel="stylesheet"> </head> <body> // Content {{----}} <script src="{{ elixir('js/app.js') }}"></script> </body> </html>
5.ããã³ã
ã¯ã©ã¹ã®ååãå€æŽããããcomposer updateãã³ãã³ããããã«æ©èœããªããªãããšããããããŸãã
ã³ã³ãœãŒã«ã³ãã³ãã®å®è¡æã«çºçããã»ãšãã©ã®ãšã©ãŒã«ã€ããŠã¯ãã³ãã³ãã圹ç«ã¡ãŸãã
composer dump-autoload composer dumpautolod
ã¯ããã³ãã³ãã¯åãã§ãäž¡æ¹ã®æ¹æ³ãæ£ããã§ãã ã©ã¡ããéžã¶ãã¯ããªã次第ã§ãã
ãŸãããã¹ãŠã® `artisan`ã³ãã³ãã®ãªã¹ããèŠããšäŸ¿å©ã§ãïŒ
php artisan list
ãããŠããã¡ãããã¢ã¯ãã£ããªã«ãŒãã®ãªã¹ãïŒ
php artisan route:list
ãªããžããª
åžæãã人ã®ããã«ã圌ãã¯ãã®ããã¥ã¢ã«ã§èšå®ãããæ¢æã®ãããžã§ã¯ãã
å
¬éãªããžããªã«æçš¿ããŸããã
ã€ãŸããããã«ãããã®ã®ããã«ãçããŠãããããã«èŠããŸãã
ãã®äŸããããã€ããã®ã¯ç°¡åã§ãã ãªããžããªã®ã¯ããŒã³ãäœæããŸãã
git clone https://github.com/andrey-helldar/laravel-example-to-juniors.git
ãããŠãã³ãã³ãã亀äºã«å®è¡ããŸãã
composer install npm install gulp
ããã ãã§ãã
ãå©çšãã楜ãã¿ãã ããã
PSïŒèª°ããç§ã«å察ããä»ã®ããè¯ã解決çãããã°ãã³ã¡ã³ãã«æžããŠãã ããïŒ
ç§ãã¡ã¯ãããªãã®åŠå®æ§ã«ã€ããŠã³ã¡ã³ãããäºå®ãšããªãããããã©ããããã瀺ããŠããããããé¡ãããŸãã
æ£æ°Žã ãã§ã¯å»ºèšçã§ã¯ãããŸããã ã¹ãã ã§ããŒãžãæ··ä¹±ãããã ãã§ããã以äžã¯ãããŸããã
UPD1ïŒ
JhaoDa ã¯ã Laravel 5.3ã®äœæ¥ããŒãžã§ã³ã®å®æãã
ã¹ã±ã«ãã³ãžã®
ãªã³ã¯ã
å
±æããŸãã ã
LaravelRUS / laravel-skeleton -LaravelRUSã³ãã¥ããã£ã®Laravel 5.3ããŒã¹ã®ã¢ããªã±ãŒã·ã§ã³ã¹ã±ã«ãã³ã