2020å¹´ãå¹ãéããããã¸ã¿ã«æè¡ã®é²åã«ãã£ã¦äººã ã®çæ´»ã社ä¼ã¯ã©ãå¤ããã®ããä¼æ¥ã¯ã©ããªå¯¾å¿ããã¹ãããåæ©ã¯ã©ãã«ããã®ãã20ã®æè¡ãå¸å ´ã»é¢å¿äºã対象ã«ã2020å¹´ã®è¡æ¹ã大èäºæ¸¬ãããä»åã¯Pythonãåãä¸ããã AIï¼äººå·¥ç¥è½ï¼éçºã«å¿ é ã®ããã°ã©ãã³ã°è¨èªã¨ãã¦äººæ°ã®ãPythonãã2020å¹´ã¯é©ç¨é åãåºãã1å¹´ã«ãªãããã ãå ·ä½çã«ã¯Webã¢ããªã±ã¼ã·ã§ã³ãAPIï¼ã¢ããªã±ã¼ã·ã§ã³ã»ããã°ã©ãã³ã°ã»ã¤ã³ã¿ã¼ãã§ã¼ã¹ï¼ãµã¼ãã¼ãããã¦å¤§è¦æ¨¡éçºã§ãæ¥åã¢ããªã±ã¼ã·ã§ã³éçºè¨èªã¨ãã¦ã®æ¡ç¨ä¾ãå¢ãããæ¬å½ãã®ä¸è§ãæ ãã 2019å¹´ã¾ã§ã®Pythonã¯AIéçºããã¼ã¿åæããã½ã³ã³æä½ã»ã¤ã³ãã©è¨å®ã®èªååã¨ãã£ãé åã«ãã使ããããæ§ã ãªç¨éãããªããå®åããããããä»ã®è¨èªã«æ¯ã¹ã¦ã©ã¤ãã©ãªã¼ï¼ããã°ã©ã ã®é¨åï¼ããã¼ã«ãå å®ãã¦ããé åããå©ç¨ãå¢ãã¦ããæ ¼
Docker 㯠image ãæå ã«ããã°ä¸ç¬ã§ãµã¼ãã¹ãç«ã¡ä¸ãããã¨ãã§ããã®ã§ä¸»ã«éçºç°å¢ã¨ãã¦ä¾¿å©ã«ä½¿ã£ã¦ã¾ãã Docker ã®ãã¹ããã©ã¯ãã£ã¹ã¨ã㦠âone process per containerâ ãä¸ãããã¦ãããä¸ã¤ã®ã·ã¹ãã ãç«ã¡ä¸ããã®ã«ã³ã³ãããè¤æ°å¿ è¦ã«ãªããã¨ãããããã¾ãããã³ã³ããéã®é£æºã¯ãã¬ã¬ã·ã¼ãª Link æ©è½ã§ä¸ã¤ãã¤ç¹ãã¦ããæ代ããé²åããDocker Network æ©è½ã§ç¬èªã®ãããã¯ã¼ã¯ãæ§æã§ããããã«ãªãã¾ãããããã¦ãDocker Compose ã§ã³ã³ãããä¸æ°ã«ç«ã¡ä¸ããã·ã¹ãã ãæ§æã§ãã¾ãã ã§ãä»ãã® Docker Compose ã®æ§æã«ã¤ãã¦æ©ãã§ãã¾ãããããªã¨ãããªã¨ããæ¡ãããã¤ãä¸ãã¦ããã®ã§ãéç¨ãã¦ã¿ã¦å¾æ¥è«ãå¾ã»ã©ã¾ã¨ãããã¨æãã¾ããæºä¸ã®ç©ºè«ãªã®ã§ãééã£ã¦ãã¨ãããããããã Docker
Laravel Augnlar Material Starterã¯ãããã³ãã¨ã³ãã«Angular Materialãããã¯ã¨ã³ãAPIã«Laravelãå©ç¨ããã·ã³ã°ã«ãã¼ã¸ã¢ããªã±ã¼ã·ã§ã³ãéçºããããã®ã¹ã¿ã¼ã¿ã¼ããã±ã¼ã¸ã§ãã Laravelã¯ãLaravel Elixirã¨ããJavascriptãCSSãªã©ã®ã¢ã»ããããã«ãããããã®gulpã¿ã¹ã¯ããã¬ã¼ã ã¯ã¼ã¯ã«äºãå«ã¾ãã¦ãã¾ãããLaravel Angular Material Starterã¯ãAngularJSã¨AngularJSãã¼ã¹ã®UIã³ã³ãã¼ãã³ããã¬ã¼ã ã¯ã¼ã¯ Angular Materialããã«ãããããã«Laravel Elixirãäºãæ§æãããLaravelããã¸ã§ã¯ãã¨è¨ã£ãæ§æã«ãªã£ã¦ãã¾ãã ã¾ããããã³ãã¨ã³ãã®AngularJSããå¼ã³åºãããLaravelå´ã®APIã«å¯¾ããèªè¨¼ã¯JWT
ã¦ã¼ã¶ã®ç¨®é¡ã«ãã£ã¦è¨±å¯ããã¡ã½ãããåããã ã¦ã¼ã¶ã®ç¨®é¡ã£ã¦1種é¡ã ãã£ã¦ãã¨ã¯ã¾ããªãã§ãããã å°ãªãã¨ãä¸è¬ã¦ã¼ã¶ã¨ç®¡çè ã®2種é¡ã¯å¿ è¦ã«ãªãã±ã¼ã¹ãã»ã¨ãã©ã ã¨æãã¾ãã ãããã£ãå ´åã«å¿ è¦ãªRoleæ©è½ãLaravel + JWTAuthã§å®è£ ããæ¹æ³ããç´¹ä»ãã¾ãã é¢é£è¨äº : [Laravel5.5ã§REST API + SPA] APIèªè¨¼ãå®è£ ãã ï¼JWTAuthï¼ ããã¯ã¨ã³ãç·¨ ã¡ãªã¿ã«ãJWTAuthã§ã®APIèªè¨¼èªä½ã®è¨äºã¯ãã£ããæ°ãããã¾ããã ããã«Roleæ©è½ããã©ã¹ããæ¹æ³ãç´¹ä»ãã¦ããè¨äºã¯è¦å½ããã¾ããã§ããã ãã®è¨äºããå½¹ã«ç«ã¦ãã°å¹¸ãã§ãã JWTAuthããã£ã¦ããå¦çã確èªãã¦ã¿ã Route::group(['middleware' => 'api'], function () { Route::group(['middlewa
2019-11-07 ãContentfulãå ¥éãConentfulã¨ã¯ï¼å°å ¥æ¹æ³ã»è¨å®æé ã®è§£èª¬ #contentful#cms#blog#webã¢ããª#api#headless cms Contentfulã¨ã¯ï¼ Contentfulã¯ããHeadless CMSãã¨å¼ã°ããAPIãã¼ã¹ã®CMSã§ãã å¾æ¥ã®CMSã¨ã®éãããæéä½å¶ãªã©ã«ã¤ãã¦ç°¡åã«èª¬æãã¾ãã å¾æ¥ã®CMSã¨Headless CMSã®éã ã¾ãCMSã¨ã¯ããContents Management Systemãã®ç¥ã§ãç´è¨³ããã¨ãã³ã³ãã³ãã管çããã·ã¹ãã ã§ãã CMSãå©ç¨ããæ大ã®ã¡ãªããã¯ãWebãµã¤ããä½æããããã®HTMLãCSSã®ç¥èããªãã¦ããããã°ãªã©ã®ã³ã³ãã³ãã管çã§ãããã¨ã§ãã å ·ä½çã«è¨ãã¨ãã³ã³ãã³ã(ããã°è¨äºãªã©)ã®ä½æã»ç·¨éã»åé¤ãªã©ãè¡ãããã®ãµã¼ãã¹ã§ãã å¾æ¥ã®CMS(W
ã¯ããã« ã¤ã³ã¿ã¼ã³ã§ãä¸è©±ã«ãªã£ã¦ãããã³ã¦ã²ã¨ç³ãã¾ããç¾å¨æ å½ããã¦ããã ãã¦ããä»äºã¯æ¥åã§ä½¿ç¨ãã¦ãã管çç»é¢ã®ãã¤ã¯ããµã¼ãã¹åã§ãã ãã¤ã¯ããµã¼ãã¹éãã¤ãªãèªè¨¼æ©è½ãå¿ è¦ã ã£ãã®ã§ãèªè¨¼ãã©ãããã©ã¼ã ã¨ãã¦ä½¿ããããã㪠ãAuth0ã㧠ã©ããªãã¨ãã§ããã®ããå®ç¾ããããã¨ã¯å¯è½ãªã®ããæ¤è¨¼ãã¦ã¿ããã¨ã«ãªãã¾ããã ãªãAuth0ãªã®ã ã¿ããã·ã¥ããã¼ããã®è¨å® + å°ãªãã³ã¼ã ã§èªè¨¼æ©è½ãç°¡åã«å®è£ ã§ããã Auth0å°ç¨ã©ã¤ããã©ãªãSDKããå¤æ°åå¨ããç®çã«å¿ããã¦ãããå©ç¨ãããã¨ã¦ã ç°¡åã«ãã¯ãã¤ã³æ©è½ãå®è£ ãããã¨ããã¦ãããã å®ç¾ãããã㨠çºè¡¨ ããããããã¨ã«ã調ã¹ãçµæã社å ã§çºè¡¨ããå ´ãè¨ãã¦ããã ãã¾ããã ããã°ã®å 容ããå°ã詳ããæ¸ãã¦ãã¾ããèªãã ãå³å®è£ ã§ãããããªã¹ã©ã¤ããå¿ããã¦ä½ãã¾ãã! speakerdeck.c
2019å¹´2æ16æ¥ãPHPã®ãã¬ã¼ã ã¯ã¼ã¯ã§ããLaravelãã¡ã¤ã³ãã¼ãã«æ®ããæè¡ã«ã³ãã¡ã¬ã³ã¹ãLaravel JP Conference2019ããéå¬ããã¾ããããLaravel JPããå ããã¤ãã³ãã¨ãã¦æ¥æ¬åéå¬ã¨ãªãä»åãæ°å¤ãã®Laravelã¦ã¼ã¶ã¼ãåå ããç¥è¦ãå ±æãã¾ãããã¬ã¼ã³ãã¼ã·ã§ã³ãLaravelã§ã®APIéçºãçéã«ããããã«ãã£ã¦ãããã¨ãã«ç»å£ããã®ã¯ãæ ªå¼ä¼ç¤¾SCOUTERã®æ¾æ¬å®å¤ªæ°ãèªç¤¾ã®APIéçºã«ããã¦åãçµãã§ãããã¨ã«ã¤ãã¦èªãã¾ãããè¬æ¼è³æã¯ãã¡ã Laravelã§ã®APIéçºãçéã«ããããã«ãã£ã¦ããã㨠æ¾æ¬å®å¤ªæ°ï¼ä»¥ä¸ãæ¾æ¬ï¼ï¼ãè¶ãããã ããããã¨ããããã¾ãããLaravelã§ã®APIéçºãçéã«ããããã«ãã£ã¦ãããã¨ãã¨ããã¿ã¤ãã«ã§çºè¡¨ããã¦ããã ãã¾ãããããããé¡ããã¾ãã ããããããç¥ã£ã¦ã人ããããã
ã¯ããã« çæ§ããã«ã¡ã¯ãOPTiMæ°å1å¹´ç®ã¨ã³ã¸ãã¢ã®éæ¨ã§ãã ååã¯æ©æ¼ããã¿ã³ãªãããä½ã£ã¦ãã¾ããã tech-blog.optim.co.jp ä»åã¯ãPHP ãã¬ã¼ã ã¯ã¼ã¯ã® Laravel ããPostgreSQL 㨠Vue.js ã¨çµã¿åããã¦ä½æãã TODO ã¢ããªãéãã¦ç´¹ä»ãã¾ãã ãã®ãã¬ã¼ã ã¯ã¼ã¯ãã¯ãã¡ãã®è¨äºã§ãå¯ãã«å©ç¨ãã¦ãã¾ãã tech-blog.optim.co.jp OPTiMã§ã¯ãã¾ãå©ç¨ããã¦ãã¾ããããä¸é¨ã®ã¢ããªã±ã¼ã·ã§ã³ã§å®å©ç¨ããã¦ããç®æããããã¾ãã PHPã¯æã®ã¤ã¡ã¼ã¸ããããªãé¿ãããã¦ãã¦ãã¾ãã...ä»ã®PHPã¨ãã®ãã¬ã¼ã ã¯ã¼ã¯ã¯ãããçºå±ãã¦ãã¦ã¨ã¦ã使ããããã®ã§æ¯é使ã£ã¦ããã ãããï¼ã¨ããæ°æã¡ãããã¾ãã ã§ãããç¾ç¶ã¯ãã¾ãå©ç¨ãã¦ããã ããªãã¦å人çã«ã¯æ²ããæ°æã¡ã§ãã£ã±ãã§ãã ãããªPHPã§ãã
Laravel + JWTAuth + Vue.js ã§APIãã°ã¤ã³èªè¨¼ã®å®è£ Laravel + JWTAuthã§APIãã°ã¤ã³ãå®è£ ãã¦ãVue + VueRouter ã§ç°¡æçã«ä½¿ç¨ããã¨ããã¾ã§ãã£ã¦ã¿ã¾ãã æ稿æ¥2018å¹´10æ11æ¥ æ´æ°æ¥2019å¹´05æ29æ¥ Laravelèªè¨¼ã®è¨å® æåã«Laravelå´ãä½ã£ã¦ããã¾ãããã artisanã§æ¨æºã®Webèªè¨¼æ©è½ããµã¯ãã¨ä½ãã¾ãã ã¿ã¼ããã«ã§ä¸è¨ã³ãã³ããå®è¡ãã¾ãã $ php artisan make:auth $ php artisan migrate ã·ã¼ãã¼ã§ããã¼ã®ã¦ã¼ã¶ã¼æ å ±ãç»é²ãã¦ããã¾ãã database/seeds/UsersTableSeeder.php <?php use Illuminate\Database\Seeder; class UsersTableSeeder extend
Laravelã§APIãå®è£ ã»æ§ç¯å¾ãAPIèªè¨¼ï¼Passportï¼ãå©ç¨ããä¸ã§ãæ´ã«èªèº«ã®JavaScriptï¼åä¸ãµã¼ãã¼ï¼ããæ§ç¯ããAPIãå©ç¨ãããå ´åãCreateFreshApiTokenããã«ã¦ã§ã¢ãå©ç¨ãããã¨ã§ç°¡åã«APIãå©ç¨ã§ããããã«ãªãã¾ãã åä¸ãµã¼ãã¼ããæ§ç¯ããAPIãå©ç¨ããã®ã«ãããããOAuthèªè¨¼ãçµç±ããã®ã¯é¢åã§ãã ããã§ãCreateFreshApiTokenããã«ã¦ã§ã¢ã¯ãlaravel_tokenã¨ããå称ã®Cookieããéä¿¡ããã¬ã¹ãã³ã¹ã¸ä»å ãã¾ãããã®Cookieã¯ãJavaScriptã¢ããªã±ã¼ã·ã§ã³ããã®APIãªã¯ã¨ã¹ããèªå¯ããããã«ä½¿ç¨ãããæå·åãããJWTãå«ãã§ãã¾ãã ãã®ãããOAuthã®æé ãè¸ããã¨ãªããAPIã¸ã®ãªã¯ã¨ã¹ããä½æã§ããããã«ãªãã¾ããï¼å¥éX-CSRF-TOKENãããã¼åã³X-Requ
Laravel Passportã¯ãLaravelä¸ã«OAuth2ã«ããAPIèªè¨¼ãç°¡åã«å®è£ ã§ããã©ã¤ãã©ãªã§ãã ãã®ãLaravel Passportãå©ç¨ããã¨ãèªèº«ã®Webã¢ããªã±ã¼ã·ã§ã³ä¸ã«å®è£ ããAPIããå¤é¨ã¸ã¨ç°¡åã«ã»ãã¥ã¢ã«å ¬éã§ãã¾ãã ããããªãããèªèº«ã®Webã¢ããªã±ã¼ã·ã§ã³ã®ç»é¢ä¸ã§ãåä¸ã®APIå©ç¨ãããå ´åãããã§ãããããããªå ´åããã¡ãã¡èªè¨¼å¦çãçµç±ããã®ã¯é¢åãªã®ã§ãLaravel Passportã§ã¯èªèº«ã®JavaScriptããAPIãå©ç¨ããæ¹æ³ãç¨æããã¦ãã¾ããä»åã¯ããã«ã¤ãã¦ç´¹ä»ãã¾ãã ä»åç´¹ä»ãã¦ããæ¹æ³ã¯ãä¸é¨å ¬å¼ããã¥ã¡ã³ãã«æ¹æ³ã®è¨è¼ãããã¾ããããã®ã¨ããã«ãã£ã¦ããã¼ã¯ã³ã®æ¸¡ãæ¹ã«ä¸åãããèªè¨¼ãéããªããã¨ããã£ãã®ã§ããã®ç¹ãè¸ã¾ãå ¬å¼ããã¥ã¡ã³ãããã詳ãã解説ãã¦ããã¾ãã åæå ¬å¼ããã¥ã¡ã³ãï¼æ¥æ¬èªç¿»è¨³ãµã¤ãï¼
#142ãJWTã©ãã«ä¿åããã¹ããåé¡ JWTãã©ãã«ä¿åããããè²ã 調ã¹ã¦ããã®ã§ããããã«ã¤ãã¦ç«¯çã«ã¾ã¨ãããããããAPIãã¡ã¼ã¹ãã§ããã³ãã¨ããã¯ãççµåãªã¢ã¼ããã¯ãã£ã¯ãªãã»ãã·ã§ã³ã§ã¯ãªãJWTã¿ãããªèªè¨¼ãã¼ã¯ã³ã使ç¨ããã®ãããAPIã®RESTã®èãæ¹ããããä¸åº¦å¾©ç¿ãããã¨ã«ããã ç®æ¬¡ APIã¯ã¹ãã¼ãã¬ã¹ã§ããã¹ãã¨ããRESTã®èã RESTã®èãæ¹ã®1ã¤ã«ãã¹ãã¼ãã¬ã¹ãã¨ãããã®ããããAPIã¯ãç¶æ ãä¿æããªããè¨è¨ã«ããã¨ãããã¨ã§ãããããããHTTPéä¿¡ã¯ãã¹ãã¼ãã¬ã¹ãã§ãããããã ã¨è²ã å°ããã¨ããã£ãããã»ãã·ã§ã³ã¨ãããã®ãç»å ´ãããã»ãã·ã§ã³ã¯ãã¹ãã¼ããã«ãã§ããããç¶æ ãä¿æãããæ©è½ã§ãããã¹ãã¼ããã«ãªã»ãã·ã§ã³ã¯ã誰ã®ãã®ãå¤å¥ããããã«ä¸æã®IDãå¿ è¦ã«ãªããä¸è¬çã«ãã®IDãä¿åããå ´æãCookieã§ãããã¯ã©ã¤ã¢ã³ãå´
ã©ãã@kimihomã§ãã API ã«é¢ããåºç¤çãªè©±ã§ããªã API ãéè¦ãªã®ããAPIã®å®è£ ã§æ³¨æããç¹ã«ã¤ãã¦è¨è¿°ããã ä»åã¯APIéçºã«ããã¦æãé ãæ©ã¾ããèªè¨¼ã®åé¡ã«ã¤ãã¦èãã¦ã¿ããã API ã«ãããèªè¨¼ ãããããã°ã¤ã³ãå¿ è¦ãªãã¼ã¸ãèãã¦ã¿ã¦ããã ãããã é常ã®Webã¢ããªã±ã¼ã·ã§ã³ã§ããã°ãCookieã¨ããä»çµã¿ã使ã£ã¦æ¯åWebãµã¼ãã¼ã«ã¢ã¯ã»ã¹ããã¨ãã«session idã¨ãããã®ãéä¿¡ããããã¨ã¦ã¼ã¶ã¼æ å ±ãç´ä»ãããã¼ã¿ãåã£ã¦ãããã¨ã§ãã©ããªã¦ã¼ã¶ã¼ãããªã¯ã¨ã¹ããæ¥ãã®ããWebã¢ããªã±ã¼ã·ã§ã³å´ã§å¤æãããã¨ãã§ãããããã«ãããç§ãã¡ã¯ãã¤ãé²è¦§ãã¦ããWebã¢ããªã±ã¼ã·ã§ã³ãèªåå°ç¨ã®ç»é¢ã¨ãã¦è¦ããããã«ãªã£ã¦ããã ãããAPIã«ãªãã¨è©±ã¯éã£ã¦ãããCookieã¨ããä»çµã¿ã使ããªãã®ã§ãããã¨ãããã¨ã§ããªãã¨ããã¦APIã«ã¢
ã·ã¹ãã é¨ã®é«æ©ã§ãã Laravel Passportã§ãWeb APIã®èªè¨¼ãå®è£ ãããã¥ã¼ããªã¢ã«ã§ãã ãã®ãã¥ã¼ããªã¢ã«ã§ã¯ãæçµçã«ä»¥ä¸ã®ãããªAPIèªè¨¼ãå®è£ ãããã¨ãç®çã¨ãã¦ãã¾ãã â Emailã¨Passwordã§Webã¢ããªã«ãã°ã¤ã³ãã ⡠管çç»é¢ã§èªèº«ã«ç´ã¥ãTokenãçºè¡ã確èªãã ⢠Tokenããªã¯ã¨ã¹ããããã¼ã«å«ããWeb APIãå©ç¨ãã ä»åã¯ãåæè¨å®ç·¨ã¨é¡ãã¦ãã¾ãLaravel Passportã®åæè¨å®ã®æ¹æ³ãç´¹ä»ãã¾ãã Laravel Passportã¨ã¯ Laravel passportã¯ãLaravelã«ããWeb APIã®èªè¨¼ã®å®è£ ããµãã¼ãããã©ã¤ãã©ãªã§ãã Laravelä¸ã§ãOAuth2ã«ããWeb APIã®èªè¨¼ãå®è£ ã§ããããã«ãªãã¾ãã ç¹å¾´ã¨ãã¦ã¯ãè¤æ°ã®èªè¨¼ããã¼ããµãã¼ããããã¨ãªã©ãããããã¾ãã åãã«ã
Laravelã§ã¢ããªã±ã¼ã·ã§ã³ãæ§ç¯ããçµé¨ããã人ãªããã°ã¤ã³èªè¨¼æ©è½ãå©ç¨ãããã¨ã§Laravelã¸ã®ã¦ã¼ã¶ã®ã¢ã¯ã»ã¹å¶éãè¡ãããã¨ã¯ç¥ã£ã¦ãããã¨æãã¾ããããããLaravelã®å¤å´ã®ã¢ããªã±ã¼ã·ã§ã³ããã¢ã¯ã»ã¹å¶éã®ããã£ã¦ããLaravelå ã®ãªã½ã¼ã¹ã«ã¢ã¯ã»ã¹ããããã«ã¯ã©ããããããã®ã§ãããããããªçåã解決ãã¦ãããã®ãLaravel Passportã§ãã Laravel Passportã使ç¨ããã¨Laravelä¸ã§OAuth2.0ã«æ²¿ã£ãå½¢ã§APIã®èªè¨¼æ©è½ãçæéã§å®è£ ãããã¨ãã§ãã¾ãã OAuth2.0ã«æ²¿ã£ãå½¢ã§APIã®èªè¨¼æ©è½ ã¨ãã£ã¦ããããä½ãããããªãã¨ãã人ã大åã ã¨æãã¾ããç°¡åã«è¨ãã°Laravelã®å¤å´ã«ããã¢ããªã±ã¼ã·ã§ã³ããã¢ã¯ã»ã¹ããããªã½ã¼ã¹ã«å¯¾ãã¦ã¢ã¯ã»ã¹ãã¼ã¯ã³(æåå)ã使ã£ã¦ç®¡çããããã®ä»çµã¿ã§ãã ã¢ã¯ã»ã¹å¶éã®è¡ã
LaravelãSPAãã¹ããã¢ããªã®ããã¯ã¨ã³ãã¨ãã¦ä½¿ãããæã¯APIãå®è£ ãããã¨ã«ãªãã¾ãã ãã°ã¤ã³æ©è½ä»ãã·ã¹ãã ã®å ´åã¯APIã§èªè¨¼ããå¿ è¦ãåºã¦ãã¾ãã Laravelã«ã¯APIèªè¨¼ãå®è£ ããããã®Passportã¨ããããã±ã¼ã¸ãå ¬å¼ã§ç¨æããã¦ãã¾ãã https://readouble.com/laravel/5.6/ja/passport.html ããã使ã£ãããã·ã³ãã«ãªãã¢ããã£ã¦ã¿ãã®ã§ãããããè©°ã¾ã£ãã®ã§è¨äºã«ãã¦ããã¾ãã å ¬å¼ããã¥ã¡ã³ã以å¤ã§ã¯ä»¥ä¸ã®è¨äºãåèã«ãã¾ããã https://blog.hinaloe.net/2016/09/15/try-passport-laravel-5-3/ http://www.dn-web64.com/archives/web/laravel_passport/ ãã¢æé Laravelããã¸ã§ã¯ãã®ç°å¢æ§ç¯ã¯
ãã®è¨äºã§ã¯ããµã¼ãã¼ãµã¤ãã¬ã³ããªã³ã°ãã Universal ã¢ã¼ãã® Nuxt.js ããã³ãã¢ããªã¨ãããã¨ã¯ç°ãªããµããã¡ã¤ã³ã§éç¨ããã Web API ã¨ããæ§æã§ã¯ããã¼èªè¨¼ã¨CORSãå®ç¾ããæ¹æ³ãç´¹ä»ãã¾ãã Nuxt ã§ã¢ããªã±ã¼ã·ã§ã³ãæ§ç¯ããå ´åããµã¼ãã¼ãµã¤ãï¼ã¨ããããã¼ã¿åå¾é¨åï¼ã¯ Web API ã«ãªãã§ãããããã㦠Web API ã§ã®èªè¨¼ã¨ããã° JWT ãç¨ããã¹ãã¼ãã¬ã¹ãªãã¼ã¯ã³èªè¨¼ãä¸è¬çãã¨æãã¾ããããã JWT ã LocalStorage ã«æ ¼ç´ããå®è£ ã¯èå¼±ãªã¢ã³ããã¿ã¼ã³ã§ããã¨ä¸»å¼µããè¨äºã以ä¸åèãªã³ã¯ã®è¨äºãèªã¿ãããã³ãã¨ã³ã + Web API ãªæ§æã§ãã¯ããã¼ã§èªè¨¼ãè¡ã CORS ã§ã¯ãã¹ãµã¤ããªã¢ã¯ã»ã¹ãé²ãå®è£ ãã¿ã¼ã³ãèãã¦ã¿ã¾ããã ä»åã®å®è£ ãã¿ã¼ã³ã¯ä»¥ä¸ã®è¨äºãåèã«ãã¾ããã ç¬èªãããããã§ãã¯ã
Laravelã§APIéçºããã¨ãã®ä¾¿å©æ©è½ã¾ã¨ã Laravelã¯SPAã®APIéçºç¨ã«ä¾¿å©ãªæ©è½ãããã¾ãã®ã§ããã¤ããç´¹ä»ãã¾ãã æ稿æ¥2019å¹´06æ14æ¥ æ´æ°æ¥2019å¹´06æ14æ¥ Laravel 5.8ã使ç¨ãã¦ãã¾ãã ãã©ã¦ã¶æ¡å¼µæ©è½ã®Clockworkã§ãããã° Laravelã®ãããã°ã¯ãLaravel Debugbarããåºã使ããã¦ãã¾ãããããã¯Viewã«ãããã°æ å ±ãæç»ããã®ã§ãViewã®ãªãAPIéçºã«ã¯å¾®å¦ã ã£ãããã¾ãã ããã§ããããããªã®ããChrome/Firefoxã®æ¡å¼µæ©è½ã®ãClockworkãã§ãã ãã©ã¦ã¶ã®æ¡å¼µæ©è½ã¯ãããããä¸è¨ãããã¦ã³ãã¼ããã¾ãã Google Chrome / Firefox æ¡å¼µæ©è½ã®ä»ã«ã³ã³ãã¼ã¶ã¼ã§ã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ããå¿ è¦ãããã¾ãã $ composer require itsgoingd
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}