{"id":24927,"date":"2024-11-21T14:08:24","date_gmt":"2024-11-21T06:08:24","guid":{"rendered":"https:\/\/fwq.ai\/blog\/24927\/"},"modified":"2024-11-21T14:08:24","modified_gmt":"2024-11-21T06:08:24","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8laravel%e5%bc%80%e5%8f%91%e4%b8%80%e4%b8%aa%e5%9c%a8%e7%ba%bf%e8%a7%86%e9%a2%91%e5%b9%b3%e5%8f%b0","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/24927\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528Laravel\u5f00\u53d1\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/465\/014\/169908151327510.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u4f7f\u7528Laravel\u5f00\u53d1\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u63d2\u56fe\" alt=\"\u5982\u4f55\u4f7f\u7528Laravel\u5f00\u53d1\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u63d2\u56fe\" \/><\/p>\n<p>\u5728\u4e92\u8054\u7f51\u65f6\u4ee3\uff0c\u89c6\u9891\u6210\u4e3a\u4e86\u4eba\u4eec\u83b7\u53d6\u4fe1\u606f\uff0c\u5b66\u4e60\u77e5\u8bc6\uff0c\u5a31\u4e50\u6d88\u9063\u7684\u91cd\u8981\u65b9\u5f0f\u3002\u56e0\u6b64\uff0c\u642d\u5efa\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u5df2\u7ecf\u6210\u4e3a\u4e86\u5f88\u591a\u5f00\u53d1\u8005\u7684\u9700\u6c42\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Laravel\u6846\u67b6\u6765\u5f00\u53d1\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\uff0c\u5e76\u63d0\u4f9b\u5177\u4f53\u7684\u4ee3\u7801\u793a\u4f8b\u3002<\/p>\n<ol>\n<li>\u786e\u5b9a\u9700\u6c42<\/li>\n<\/ol>\n<p>\u5728\u5f00\u59cb\u5f00\u53d1\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u660e\u786e\u81ea\u5df1\u7684\u9700\u6c42\u3002\u4e00\u4e2a\u57fa\u672c\u7684\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u9700\u8981\u5177\u5907\u4ee5\u4e0b\u529f\u80fd\uff1a<\/p>\n<ul>\n<li>\u89c6\u9891\u4e0a\u4f20<\/li>\n<li>\u89c6\u9891\u64ad\u653e<\/li>\n<li>\u89c6\u9891\u5206\u7c7b<\/li>\n<li>\u89c6\u9891\u641c\u7d22<\/li>\n<li>\u89c6\u9891\u8bc4\u8bba<\/li>\n<li>\u7528\u6237\u6ce8\u518c\u4e0e\u767b\u5f55<\/li>\n<li>\u7528\u6237\u7ba1\u7406<\/li>\n<\/ul>\n<ol>\n<li>\u73af\u5883\u914d\u7f6e<\/li>\n<\/ol>\n<p>\u5728\u5f00\u59cb\u4f7f\u7528Laravel\u6846\u67b6\u8fdb\u884c\u5f00\u53d1\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u914d\u7f6e\u597d\u73af\u5883\u3002\u53ef\u4ee5\u91c7\u7528XAMPP\u6216WAMPP\u7b49\u96c6\u6210\u73af\u5883\u8fdb\u884c\u914d\u7f6e\uff0c\u540c\u65f6 \u5b89\u88c5Composer\uff0c\u5b83\u662fPHP\u7684\u4f9d\u8d56\u7ba1\u7406\u5668\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u7ba1\u7406Laravel\u6846\u67b6\u6240\u9700\u7684\u4f9d\u8d56\u5e93\u3002<\/p>\n<ol>\n<li>\u521b\u5efa\u9879\u76ee<\/li>\n<\/ol>\n<p>\u5728\u73af\u5883\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5f00\u59cb\u521b\u5efaLaravel\u9879\u76ee\u3002\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>composer create-project --prefer-dist laravel\/laravel videoplatform<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cvideoplatform\u201d\u7684Laravel\u9879\u76ee\u3002<\/p>\n<ol>\n<li>\u6570\u636e\u5e93\u8bbe\u8ba1\u4e0e\u8fc1\u79fb<\/li>\n<\/ol>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u8bbe\u8ba1\u6570\u636e\u5e93\uff0c\u5e76\u6267\u884c\u8fc1\u79fb\u3002\u5728\u672c\u6b21\u9879\u76ee\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u8bbe\u8ba1\u7684\u8868\u5982\u4e0b\uff1a<\/p>\n<ul>\n<li>users\uff08\u5b58\u50a8\u7528\u6237\u4fe1\u606f\uff09<\/li>\n<li>videos\uff08\u5b58\u50a8\u89c6\u9891\u4fe1\u606f\uff09<\/li>\n<li>categories\uff08\u5b58\u50a8\u89c6\u9891\u5206\u7c7b\u4fe1\u606f\uff09<\/li>\n<li>comments\uff08\u5b58\u50a8\u89c6\u9891\u8bc4\u8bba\u4fe1\u606f\uff09<\/li>\n<\/ul>\n<p>\u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u521b\u5efamigration\uff1a<\/p>\n<pre>php artisan make:migration create_users_table\nphp artisan make:migration create_videos_table\nphp artisan make:migration create_categories_table\nphp artisan make:migration create_comments_table<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u7f16\u8f91\u6bcf\u4e2amigration\u6587\u4ef6\uff0c\u8fdb\u884c\u6570\u636e\u5e93\u8bbe\u8ba1\u3002<\/p>\n<p>\u5728\u5b8c\u6210\u6570\u636e\u5e93\u8bbe\u8ba1\u540e\uff0c\u56de\u5230\u7ec8\u7aef\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u8fc1\u79fb\uff1a<\/p>\n<pre>php artisan migrate<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u8def\u7531\u8bbe\u8ba1<\/li>\n<\/ol>\n<p>\u5728Laravel\u4e2d\uff0c\u8def\u7531\u63a7\u5236\u7740URL\u5e94\u8be5\u5982\u4f55\u54cd\u5e94\u3002\u7f16\u8f91routes\/web.php\u6587\u4ef6\uff0c\u8bbe\u8ba1\u8def\u7531\uff1a<\/p>\n<pre>Route::get('\/', 'HomeController@index')-&amp;gt;name('home');\nRoute::get('\/videos', 'VideoController@index')-&amp;gt;name('videos.index');\nRoute::get('\/videos\/create', 'VideoController@create')-&amp;gt;name('videos.create');\nRoute::post('\/videos\/store', 'VideoController@store')-&amp;gt;name('videos.store');\nRoute::get('\/videos\/{id}', 'VideoController@show')-&amp;gt;name('videos.show');\nRoute::get('\/videos\/{id}\/edit', 'VideoController@edit')-&amp;gt;name('videos.edit');\nRoute::put('\/videos\/{id}', 'VideoController@update')-&amp;gt;name('videos.update');\nRoute::delete('\/videos\/{id}', 'VideoController@destroy')-&amp;gt;name('videos.destroy');\nRoute::post('\/comments', 'CommentController@store')-&amp;gt;name('comments.store');<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<ol>\n<li>\u89c6\u56fe\u8bbe\u8ba1<\/li>\n<\/ol>\n<p>\u89c6\u56fe\u662f\u7528\u6237\u4e0e\u5e94\u7528\u4ea4\u4e92\u7684\u91cd\u8981\u754c\u9762\uff0c\u9700\u8981\u8bbe\u8ba1\u826f\u597d\uff0c\u7f8e\u89c2\u5927\u65b9\u3002\u5728resources\/views\u76ee\u5f55\u4e0b\u521b\u5efa\u4ee5\u4e0b\u89c6\u56fe\u6587\u4ef6\uff1a<\/p>\n<ul>\n<li>home.blade.php\uff08\u9996\u9875\uff09<\/li>\n<li>videos\/index.blade.php\uff08\u89c6\u9891\u5217\u8868\u9875\uff09<\/li>\n<li>videos\/create.blade.php\uff08\u89c6\u9891\u4e0a\u4f20\u9875\uff09<\/li>\n<li>videos\/show.blade.php\uff08\u89c6\u9891\u64ad\u653e\u9875\uff09<\/li>\n<li>videos\/edit.blade.php\uff08\u89c6\u9891\u7f16\u8f91\u9875\uff09<\/li>\n<\/ul>\n<ol>\n<li>\u6a21\u578b\u8bbe\u8ba1<\/li>\n<\/ol>\n<p>\u5728Laravel\u4e2d\uff0c\u6a21\u578b\u662f\u4e0e\u6570\u636e\u5e93\u8868\u5bf9\u5e94\u7684\u7c7b\u3002\u5b83\u4eec\u8d1f\u8d23\u4e0e\u6570\u636e\u5e93\u8fdb\u884c\u4ea4\u4e92\uff0c\u5e76\u4e3a\u63a7\u5236\u5668\u63d0\u4f9b\u6570\u636e\u3002\u5728app\u76ee\u5f55\u4e0b\u521b\u5efa\u4ee5\u4e0b\u6a21\u578b\u6587\u4ef6\uff1a<\/p>\n<ul>\n<li>User.php<\/li>\n<li>Video.php<\/li>\n<li>Category.php<\/li>\n<li>Comment.php<\/li>\n<\/ul>\n<ol>\n<li>\u63a7\u5236\u5668\u8bbe\u8ba1<\/li>\n<\/ol>\n<p>\u5728Laravel\u4e2d\uff0c\u63a7\u5236\u5668\u8d1f\u8d23\u4ece\u6a21\u578b\u4e2d\u83b7\u53d6\u6570\u636e\uff0c\u5e76\u5728\u89c6\u56fe\u4e2d\u5448\u73b0\u3002\u5728app\/Http\/Controllers\u76ee\u5f55\u4e0b\u521b\u5efa\u4ee5\u4e0b\u63a7\u5236\u5668\u6587\u4ef6\uff1a<\/p>\n<ul>\n<li>HomeController.php<\/li>\n<li>VideoController.php<\/li>\n<li>CommentController.php<\/li>\n<\/ul>\n<ol>\n<li>\u4ee3\u7801\u5c55\u793a<\/li>\n<\/ol>\n<p>\u4ee5\u4e0a\u662f\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u5f00\u53d1\u7684\u5927\u81f4\u6d41\u7a0b\uff0c\u4e0b\u9762\u5c55\u793a\u4e00\u4e9b\u6838\u5fc3\u7684\u4ee3\u7801\u7247\u6bb5\u3002<\/p>\n<p>\u5728Video\u6a21\u578b\u4e2d\u6dfb\u52a0\u5173\u8054\u5173\u7cfb\uff0c\u5e76\u5b9a\u4e49\u4e00\u4e2a\u540d\u4e3a\u201cthumbnail\u201d\u7684\u8bbf\u95ee\u5668\uff0c\u7528\u4e8e\u83b7\u53d6\u89c6\u9891\u7684\u7f29\u7565\u56fe\u3002<\/p>\n<pre>class Video extends Model\n{\n    \/\/ \u6dfb\u52a0\u5206\u7c7b\u5173\u8054\u5173\u7cfb\n    public function category()\n    {\n        return $this-&amp;gt;belongsTo(Category::class);\n    }\n\n    \/\/ \u6dfb\u52a0\u8bc4\u8bba\u5173\u8054\u5173\u7cfb\n    public function comments()\n    {\n        return $this-&amp;gt;hasMany(Comment::class);\n    }\n\n    \/\/ \u5b9a\u4e49\u7f29\u7565\u56fe\u8bbf\u95ee\u5668\n    public function getThumbnailAttribute()\n    {\n        return Storage::url($this-&amp;gt;attributes['thumbnail']);\n    }\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728VideoController\u4e2d\u5b9e\u73b0\u89c6\u9891\u4e0a\u4f20\u529f\u80fd\uff1a<\/p>\n<pre>class VideoController extends Controller\n{\n    \/\/ \u663e\u793a\u89c6\u9891\u4e0a\u4f20\u9875\u9762\n    public function create()\n    {\n        $categories = Category::all();\n\n        return view('videos.create', compact('categories'));\n    }\n\n    \/\/ \u5904\u7406\u89c6\u9891\u4e0a\u4f20\u8bf7\u6c42\n    public function store(Request $request)\n    {\n        $request-&amp;gt;validate([\n            'title' =&amp;gt; 'required|max:255',\n            'description' =&amp;gt; 'nullable|max:1000',\n            'category_id' =&amp;gt; 'required|numeric',\n            'video_file' =&amp;gt; 'required|mimetypes:video\/mp4|max:102400',\n            'thumbnail_file' =&amp;gt; 'required|mimetypes:image\/jpeg,image\/png|max:1024',\n        ]);\n\n        $video = new Video();\n\n        $video-&amp;gt;title = $request-&amp;gt;get('title');\n        $video-&amp;gt;description = $request-&amp;gt;get('description');\n        $video-&amp;gt;category_id = $request-&amp;gt;get('category_id');\n        $video-&amp;gt;user_id = Auth::id();\n\n        $video_file = $request-&amp;gt;file('video_file');\n        $video_file_name = uniqid().'.'.$video_file-&amp;gt;getClientOriginalExtension();\n        Storage::putFileAs('public\/videos', $video_file, $video_file_name);\n        $video-&amp;gt;video_file = 'storage\/videos\/'.$video_file_name;\n\n        $thumbnail_file = $request-&amp;gt;file('thumbnail_file');\n        $thumbnail_file_name = uniqid().'.'.$thumbnail_file-&amp;gt;getClientOriginalExtension();\n        Storage::putFileAs('public\/videos\/thumbnails', $thumbnail_file, $thumbnail_file_name);\n        $video-&amp;gt;thumbnail = 'storage\/videos\/thumbnails\/'.$thumbnail_file_name;\n\n        $video-&amp;gt;save();\n\n        return redirect()-&amp;gt;route('videos.index');\n    }\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5728CommentController\u4e2d\u5b9e\u73b0\u8bc4\u8bba\u53d1\u5e03\u529f\u80fd\uff1a<\/p>\n<pre>class CommentController extends Controller\n{\n    public function store(Request $request)\n    {\n        $request-&amp;gt;validate([\n            'video_id' =&amp;gt; 'required|numeric',\n            'content' =&amp;gt; 'required|max:1000',\n        ]);\n\n        $comment = new Comment();\n\n        $comment-&amp;gt;video_id = $request-&amp;gt;get('video_id');\n        $comment-&amp;gt;user_id = Auth::id();\n        $comment-&amp;gt;content = $request-&amp;gt;get('content');\n\n        $comment-&amp;gt;save();\n\n        return redirect()-&amp;gt;back();\n    }\n}<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236   <\/p>\n<p>\u5230\u6b64\u4e3a\u6b62\uff0c\u60a8\u5df2\u7ecf\u5b66\u4f1a\u4e86\u4f7f\u7528Laravel\u6846\u67b6\u6765\u5f00\u53d1\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u3002\u5f53\u7136\uff0c\u8fd8\u6709\u5f88\u591a\u5176\u4ed6\u7684\u529f\u80fd\u9700\u8981\u60a8\u81ea\u884c\u5f00\u53d1\u5b8c\u5584\u3002\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u4f7f\u7528Laravel\u5f00\u53d1\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u4e92\u8054\u7f51\u65f6\u4ee3\uff0c\u89c6\u9891\u6210\u4e3a\u4e86\u4eba\u4eec\u83b7\u53d6\u4fe1\u606f\uff0c\u5b66\u4e60\u77e5\u8bc6\uff0c\u5a31\u4e50\u6d88\u9063\u7684\u91cd\u8981\u65b9\u5f0f\u3002\u56e0\u6b64\uff0c\u642d\u5efa\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u5df2\u7ecf\u6210\u4e3a\u4e86\u5f88\u591a\u5f00\u53d1\u8005\u7684\u9700\u6c42\u3002\u672c\u6587\u5c06\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Laravel\u6846\u67b6\u6765\u5f00\u53d1\u4e00\u4e2a\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\uff0c\u5e76\u63d0\u4f9b\u5177\u4f53\u7684\u4ee3\u7801\u793a\u4f8b\u3002 \u786e\u5b9a\u9700\u6c42 \u5728\u5f00\u59cb\u5f00\u53d1\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u660e\u786e\u81ea\u5df1\u7684\u9700\u6c42\u3002\u4e00\u4e2a\u57fa\u672c\u7684\u5728\u7ebf\u89c6\u9891\u5e73\u53f0\u9700\u8981\u5177\u5907\u4ee5\u4e0b\u529f\u80fd\uff1a \u89c6\u9891\u4e0a\u4f20 \u89c6\u9891\u64ad\u653e \u89c6\u9891\u5206\u7c7b \u89c6\u9891\u641c\u7d22 \u89c6\u9891\u8bc4\u8bba \u7528\u6237\u6ce8\u518c\u4e0e\u767b\u5f55 \u7528\u6237\u7ba1\u7406 \u73af\u5883\u914d\u7f6e \u5728\u5f00\u59cb\u4f7f\u7528Laravel\u6846\u67b6\u8fdb\u884c\u5f00\u53d1\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5148\u914d\u7f6e\u597d\u73af\u5883\u3002\u53ef\u4ee5\u91c7\u7528XAMPP\u6216WAMPP\u7b49\u96c6\u6210\u73af\u5883\u8fdb\u884c\u914d\u7f6e\uff0c\u540c\u65f6 \u5b89\u88c5Composer\uff0c\u5b83\u662fPHP\u7684\u4f9d\u8d56\u7ba1\u7406\u5668\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u7ba1\u7406Laravel\u6846\u67b6\u6240\u9700\u7684\u4f9d\u8d56\u5e93\u3002 \u521b\u5efa\u9879\u76ee \u5728\u73af\u5883\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5f00\u59cb\u521b\u5efaLaravel\u9879\u76ee\u3002\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a composer create-project &#8211;prefer-dist laravel\/laravel videoplatform \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u4e2a\u547d\u4ee4\u5c06\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201cvideoplatform\u201d\u7684Laravel\u9879\u76ee\u3002 \u6570\u636e\u5e93\u8bbe\u8ba1\u4e0e\u8fc1\u79fb \u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u9700\u8981\u8bbe\u8ba1\u6570\u636e\u5e93\uff0c\u5e76\u6267\u884c\u8fc1\u79fb\u3002\u5728\u672c\u6b21\u9879\u76ee\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u8bbe\u8ba1\u7684\u8868\u5982\u4e0b\uff1a users\uff08\u5b58\u50a8\u7528\u6237\u4fe1\u606f\uff09 videos\uff08\u5b58\u50a8\u89c6\u9891\u4fe1\u606f\uff09 categories\uff08\u5b58\u50a8\u89c6\u9891\u5206\u7c7b\u4fe1\u606f\uff09 comments\uff08\u5b58\u50a8\u89c6\u9891\u8bc4\u8bba\u4fe1\u606f\uff09 \u5728\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\uff0c\u521b\u5efamigration\uff1a php artisan make:migration create_users_table php artisan make:migration create_videos_table php artisan make:migration create_categories_table php artisan make:migration create_comments_table \u767b\u5f55\u540e\u590d\u5236 \u7f16\u8f91\u6bcf\u4e2amigration\u6587\u4ef6\uff0c\u8fdb\u884c\u6570\u636e\u5e93\u8bbe\u8ba1\u3002 \u5728\u5b8c\u6210\u6570\u636e\u5e93\u8bbe\u8ba1\u540e\uff0c\u56de\u5230\u7ec8\u7aef\uff0c\u6267\u884c\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u8fc1\u79fb\uff1a php artisan migrate \u767b\u5f55\u540e\u590d\u5236 \u8def\u7531\u8bbe\u8ba1 \u5728Laravel\u4e2d\uff0c\u8def\u7531\u63a7\u5236\u7740URL\u5e94\u8be5\u5982\u4f55\u54cd\u5e94\u3002\u7f16\u8f91routes\/web.php\u6587\u4ef6\uff0c\u8bbe\u8ba1\u8def\u7531\uff1a Route::get(&#8216;\/&#8217;, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-24927","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/24927","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=24927"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/24927\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=24927"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=24927"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=24927"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}