{"id":2553,"date":"2019-07-21T10:04:25","date_gmt":"2019-07-21T01:04:25","guid":{"rendered":"https:\/\/promidea.co.jp\/?p=2553"},"modified":"2021-08-03T10:41:28","modified_gmt":"2021-08-03T01:41:28","slug":"laravel%e3%81%a7%e3%83%ad%e3%82%b0%e3%82%a4%e3%83%b3%e6%a9%9f%e8%83%bd%e3%82%92%e5%ae%9f%e8%a3%85%e3%81%99%e3%82%8b%e6%89%8b%e9%a0%86%e3%81%a8%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%b3%e3%83%bc","status":"publish","type":"post","link":"https:\/\/promidea.co.jp\/?p=2553","title":{"rendered":"Laravel\u3067\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u624b\u9806\u3068\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9"},"content":{"rendered":"<p><a href=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/HyhZvj_QBcSKTVa1563497465_1563497511.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-2566\" src=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/HyhZvj_QBcSKTVa1563497465_1563497511.jpg\" alt=\"Laravel\u3067\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u624b\u9806\u3068\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\" width=\"640\" height=\"419\" srcset=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/HyhZvj_QBcSKTVa1563497465_1563497511.jpg 640w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/HyhZvj_QBcSKTVa1563497465_1563497511-300x196.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>\u30d7\u30ed\u30df\u30c7\u30a3\u30a2\u5408\u540c\u4f1a\u793e\u306e\u6589\u85e4\u3067\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fLaravel5.5\u3067\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3001\u5b9f\u88c5\u3068\u8a00\u3063\u3066\u3082\u30b3\u30de\u30f3\u30c9\u3072\u3068\u3064\u3067\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3001\u52d5\u304b\u3059\u3060\u3051\u306a\u3089\u3084\u308b\u3053\u3068\u306f\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<p>\u7c21\u5358\u3059\u304e\u3066\u62cd\u5b50\u629c\u3051\u3059\u308b\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<!--TOC-->\n<h2>make\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c<\/h2>\n<p>\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u76f4\u4e0b\u3067\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n<div class=\"graybox\">\n<p>php artisan make:auth<\/p>\n<\/div>\n<p>\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3057\u3001users\u30c6\u30fc\u30d6\u30eb\u3001password_resets\u30c6\u30fc\u30d6\u30eb\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n<div class=\"graybox\">\n<p>php artisan migrate<\/p>\n<\/div>\n<p>\u3053\u308c\u3060\u3051\u3067\u3001\u3082\u3046\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u306f\u52d5\u4f5c\u3057\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u89e3\u8aac<\/h2>\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306f\u3069\u306e\u3088\u3046\u306b\u306a\u3063\u305f\u306e\u304b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0<\/h3>\n<p><a href=\"https:\/\/github.com\/SadayoshiSaito\/login_sample\/blob\/master\/routes\/web.php\" target=\"_blank\" rel=\"noopener\">routes\/web.php<\/a><\/p>\n<pre class=\"lang:default decode:true \">&lt;?php\r\n\r\n\/*\r\n|--------------------------------------------------------------------------\r\n| Web Routes\r\n|--------------------------------------------------------------------------\r\n|\r\n| Here is where you can register web routes for your application. These\r\n| routes are loaded by the RouteServiceProvider within a group which\r\n| contains the \"web\" middleware group. Now create something great!\r\n|\r\n*\/\r\n\r\nRoute::get('\/', function () {\r\n    return view('welcome');\r\n});\r\n\r\nAuth::routes();\r\n\r\nRoute::get('\/home', 'HomeController@index')-&gt;name('home');\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>\u307e\u305a\u300cAuth::routes();\u300d\u304c\u5897\u3048\u3066\u3044\u307e\u3059\u306d\u3002<\/p>\n<p>\u3053\u308c\u306f\u30ed\u30b0\u30a4\u30f3\u95a2\u9023\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u675f\u306d\u305f\u8a18\u8ff0\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u969b\u306e\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u306fvendor\u4ee5\u4e0b\u306eRouter.php\u306b\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>vendor\/laravel\/framework\/src\/Illuminate\/Routing\/Router.php<\/p>\n<pre class=\"lang:default decode:true\">\/**\r\n     * Register the typical authentication routes for an application.\r\n     *\r\n     * @param  array  $options\r\n     * @return void\r\n     *\/\r\n    public function auth(array $options = [])\r\n    {\r\n        \/\/ Authentication Routes...\r\n        $this-&gt;get('login', 'Auth\\LoginController@showLoginForm')-&gt;name('login');\r\n        $this-&gt;post('login', 'Auth\\LoginController@login');\r\n        $this-&gt;post('logout', 'Auth\\LoginController@logout')-&gt;name('logout');\r\n\r\n        \/\/ Registration Routes...\r\n        if ($options['register'] ?? true) {\r\n            $this-&gt;get('register', 'Auth\\RegisterController@showRegistrationForm')-&gt;name('register');\r\n            $this-&gt;post('register', 'Auth\\RegisterController@register');\r\n        }\r\n\r\n        \/\/ Password Reset Routes...\r\n        if ($options['reset'] ?? true) {\r\n            $this-&gt;resetPassword();\r\n        }\r\n\r\n        \/\/ Email Verification Routes...\r\n        if ($options['verify'] ?? false) {\r\n            $this-&gt;emailVerification();\r\n        }\r\n    }\r\n\r\n    \/**\r\n     * Register the typical reset password routes for an application.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function resetPassword()\r\n    {\r\n        $this-&gt;get('password\/reset', 'Auth\\ForgotPasswordController@showLinkRequestForm')-&gt;name('password.request');\r\n        $this-&gt;post('password\/email', 'Auth\\ForgotPasswordController@sendResetLinkEmail')-&gt;name('password.email');\r\n        $this-&gt;get('password\/reset\/{token}', 'Auth\\ResetPasswordController@showResetForm')-&gt;name('password.reset');\r\n        $this-&gt;post('password\/reset', 'Auth\\ResetPasswordController@reset')-&gt;name('password.update');\r\n    }\r\n\r\n    \/**\r\n     * Register the typical email verification routes for an application.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function emailVerification()\r\n    {\r\n        $this-&gt;get('email\/verify', 'Auth\\VerificationController@show')-&gt;name('verification.notice');\r\n        $this-&gt;get('email\/verify\/{id}', 'Auth\\VerificationController@verify')-&gt;name('verification.verify');\r\n        $this-&gt;get('email\/resend', 'Auth\\VerificationController@resend')-&gt;name('verification.resend');\r\n    }\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9<\/h2>\n<p><a href=\"https:\/\/github.com\/SadayoshiSaito\/login_sample\/blob\/master\/app\/Http\/Controllers\/HomeController.php\" target=\"_blank\" rel=\"noopener\">app\/Http\/Controllers\/HomeController.php<\/a><\/p>\n<pre class=\"lang:default decode:true \">&lt;?php\r\n\r\nnamespace App\\Http\\Controllers;\r\n\r\nuse Illuminate\\Http\\Request;\r\n\r\nclass HomeController extends Controller\r\n{\r\n    \/**\r\n     * Create a new controller instance.\r\n     *\r\n     * @return void\r\n     *\/\r\n    public function __construct()\r\n    {\r\n        $this-&gt;middleware('auth');\r\n    }\r\n\r\n    \/**\r\n     * Show the application dashboard.\r\n     *\r\n     * @return \\Illuminate\\Contracts\\Support\\Renderable\r\n     *\/\r\n    public function index()\r\n    {\r\n        return view('home');\r\n    }\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p>make Auth\u306e\u30b3\u30de\u30f3\u30c9\u306b\u3088\u308a\u30b5\u30f3\u30d7\u30eb\u753b\u9762\u3068\u3057\u3066\u3001\/home\u3082\u8ffd\u52a0\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>HomeController\u306b\u306f\u30b3\u30f3\u30b9\u30c8\u30e9\u30af\u30bf\u3067<a href=\"https:\/\/readouble.com\/laravel\/5.5\/ja\/middleware.html\" target=\"_blank\" rel=\"noopener\">\u30df\u30c9\u30eb\u30a6\u30a7\u30a2<\/a>\u3068\u3057\u3066auth\u304c\u8a2d\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u306b\u3088\u308a\u3001\u30ed\u30b0\u30a4\u30f3\u30c1\u30a7\u30c3\u30af\u304c\u304b\u304b\u308a\u307e\u3059\u306e\u3067\u3001\u30ed\u30b0\u30a4\u30f3\u305b\u305a\u306b\/home\u306b\u30a2\u30af\u30bb\u30b9\u3057\u305f\u3089\u3001\u3044\u3063\u305f\u3093\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u306b\u98db\u3070\u3055\u308c\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u753b\u9762\u8868\u793a<\/h2>\n<p>\u30b5\u30f3\u30d7\u30eb\u306e\u30ed\u30b0\u30a4\u30f3\u753b\u9762\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<p>\u4f1a\u54e1\u767b\u9332\u304c\u307e\u3060\u3067\u3042\u308c\u3070\u3001Register\u304b\u3089\u4f1a\u54e1\u767b\u9332\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u753b\u9762\u30c7\u30b6\u30a4\u30f3\u306f\u300c<span class=\"huto\">resources\/views\/auth<\/span>\u300d\u4ee5\u4e0b\u306b\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u30c7\u30b6\u30a4\u30f3\u3082\u5909\u66f4\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p><a href=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/0cc02ddefb4834cf70867e3a7ee11987.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-2557\" src=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/0cc02ddefb4834cf70867e3a7ee11987.png\" alt=\"\" width=\"1120\" height=\"367\" srcset=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/0cc02ddefb4834cf70867e3a7ee11987.png 1120w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/0cc02ddefb4834cf70867e3a7ee11987-300x98.png 300w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/0cc02ddefb4834cf70867e3a7ee11987-768x252.png 768w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/07\/0cc02ddefb4834cf70867e3a7ee11987-1024x336.png 1024w\" sizes=\"(max-width: 1120px) 100vw, 1120px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p><a href=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/02\/53e0d72ad9bae4b1e39c3b1c6bf377dd_s-1.jpg\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-2543\" src=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/02\/53e0d72ad9bae4b1e39c3b1c6bf377dd_s-1.jpg\" alt=\"\" width=\"640\" height=\"454\" srcset=\"https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/02\/53e0d72ad9bae4b1e39c3b1c6bf377dd_s-1.jpg 640w, https:\/\/promidea.co.jp\/db\/wp-content\/uploads\/2019\/02\/53e0d72ad9bae4b1e39c3b1c6bf377dd_s-1-300x213.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a>Laravel\u3092\u4f7f\u3048\u3070\u3001\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u306f\u7c21\u5358\u306b\u5b9f\u88c5\u3067\u304d\u308b\u3053\u3068\u304c\u304a\u5206\u304b\u308a\u3044\u305f\u3060\u3051\u305f\u304b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u307b\u3068\u3093\u3069\u306eWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u306f\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u3064\u3051\u307e\u3059\u306e\u3067\u3001\u3053\u306e\u90e8\u5206\u306e\u624b\u9593\u304c\u7701\u3051\u308b\u306e\u306f\u5927\u304d\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d7\u30ed\u30df\u30c7\u30a3\u30a2\u5408\u540c\u4f1a\u793e\u306e\u6589\u85e4\u3067\u3059\u3002 \u4eca\u56de\u306fLaravel5.5\u3067\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac\u3057\u307e\u3059\u3002 \u305f\u3060\u3001\u5b9f\u88c5\u3068\u8a00\u3063\u3066\u3082\u30b3\u30de\u30f3\u30c9\u3072\u3068\u3064\u3067\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3001\u52d5\u304b\u3059\u3060\u3051\u306a\u3089\u3084\u308b\u3053\u3068\u306f\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u3002 \u7c21\u5358\u3059\u304e\u3066\u62cd [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2566,"comment_status":"open","ping_status":"open","sticky":false,"template":"page-templates\/right-sidebar.php","format":"standard","meta":[],"categories":[65,66],"tags":[],"_links":{"self":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2553"}],"collection":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2553"}],"version-history":[{"count":17,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2553\/revisions"}],"predecessor-version":[{"id":2572,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/posts\/2553\/revisions\/2572"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=\/wp\/v2\/media\/2566"}],"wp:attachment":[{"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/promidea.co.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}