{"id":871,"date":"2025-06-12T01:38:44","date_gmt":"2025-06-11T17:38:44","guid":{"rendered":"https:\/\/www.zhaozhao123.cn\/php\/php-application-manual\/laravel\/871.html"},"modified":"2025-06-12T01:38:44","modified_gmt":"2025-06-11T17:38:44","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8-laravel-%e4%b8%ad%e5%ae%9e%e7%8e%b0-ci-cd%ef%bc%9a%e5%ae%9e%e8%b7%b5%e6%8c%87%e5%8d%97","status":"publish","type":"my1js","link":"https:\/\/www.zhaozhao123.cn\/php\/my1js\/871.html","title":{"rendered":"\u5982\u4f55\u5728 Laravel \u4e2d\u5b9e\u73b0 CI\/CD\uff1a\u5b9e\u8df5\u6307\u5357"},"content":{"rendered":"<div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--1\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/dyA-1-400x300.jpg\" alt=\"Bug&#32534;&#35793;&#29422;\" class=\"wp-image-1842\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading my-0\" style=\"font-size:clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.175), 1rem);\">Bug&#32534;&#35793;&#29422;<\/h2>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#22312; Laravel &#20013;&#23454;&#29616;&#25345;&#32493;&#38598;&#25104;&#65288;CI&#65289;&#21644;&#25345;&#32493;&#37096;&#32626;&#65288;CD&#65289;&#65292;&#21487;&#20197;&#24110;&#21161;&#20320;&#25552;&#39640;&#24320;&#21457;&#25928;&#29575;&#12289;&#20943;&#23569;&#38169;&#35823;&#24182;&#30830;&#20445;&#20195;&#30721;&#30340;&#31283;&#23450;&#24615;&#21644;&#23433;&#20840;&#24615;&#12290;&#20197;&#19979;&#26159;&#19968;&#20010;&#35814;&#32454;&#30340;&#23454;&#36341;&#25351;&#21335;&#65292;&#24110;&#21161;&#20320;&#22312; Laravel &#39033;&#30446;&#20013;&#35774;&#32622; CI\/CD &#29615;&#22659;&#12290;<\/p>\n<h3>1. &#23433;&#35013; GitLab CI<\/h3>\n<p>GitLab &#26159;&#19968;&#20010;&#27969;&#34892;&#30340;&#24320;&#28304; CI\/CD &#24037;&#20855;&#65292;&#25903;&#25345;&#22810;&#31181;&#32534;&#31243;&#35821;&#35328;&#21644;&#26694;&#26550;&#12290;&#20197;&#19979;&#26159;&#23433;&#35013; GitLab CI &#30340;&#22522;&#26412;&#27493;&#39588;&#65306;<\/p>\n<h4>&#22312;&#26381;&#21153;&#22120;&#19978;&#23433;&#35013; GitLab CE<\/h4>\n<ol>\n<li>\n<p><strong>&#19979;&#36733;&#24182;&#35299;&#21387; GitLab CE<\/strong>&#65306;<\/p>\n<pre><code class=\"language-bash\">wget https:\/\/download.gitlab.com\/gitlab\/gitlab-ce\/releases\/download\/v15.0.2\/gitlab-ce-15.0.2.tar.gz\ntar -xzvf gitlab-ce-15.0.2.tar.gz\ncd gitlab-ce-15.0.2<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#21021;&#22987;&#21270;&#25968;&#25454;&#24211;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-bash\">sudo .\/bin\/install.sh --gitlab-ruby-version=3.2.24 --gitlab-shell-path=\/var\/opt\/gitlab\/gitlab-shell --gitlab-workhorse-path=\/var\/opt\/gitlab\/gitlab-workhorse --gitlab-web-server-path=\/opt\/gitlab\/nginx --gitlab-gitlab-runner-path=\/opt\/gitlab\/gitlab-runner --external-url=\"http:\/\/yourserver.example.com\"<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#37197;&#32622; GitLab<\/strong>&#65306;\n&#25171;&#24320;&#27983;&#35272;&#22120;&#35775;&#38382; <code>http:\/\/yourserver.example.com<\/code>&#65292;&#25353;&#29031;&#25552;&#31034;&#23436;&#25104;&#21021;&#22987;&#35774;&#32622;&#12290;<\/p>\n<\/li>\n<\/ol>\n<h3>2. &#37197;&#32622; Laravel &#39033;&#30446;<\/h3>\n<p>&#22312;&#20320;&#30340; Laravel &#39033;&#30446;&#26681;&#30446;&#24405;&#19979;&#21019;&#24314; <code>.gitlab-ci.yml<\/code> &#25991;&#20214;&#65292;&#24182;&#28155;&#21152;&#20197;&#19979;&#20869;&#23481;&#65306;<\/p>\n<pre><code class=\"language-yaml\">stages:\n  - build\n  - test\n  - deploy\n\nbuild:\n  stage: build\n  script:\n    - composer install\n    - php artisan clear-compiled\n\ntest:\n  stage: test\n  script:\n    - vendor\/bin\/phpunit\n\ndeploy:\n  stage: deploy\n  only:\n    - master\n  script:\n    - git add .\n    - git commit -m \"Deploying to production\"\n    - git push origin master<\/code><\/pre>\n<h3>3. &#37197;&#32622; Composer &#21644; PHP<\/h3>\n<p>&#30830;&#20445;&#20320;&#30340; Composer &#21644; PHP &#29256;&#26412;&#26159;&#26368;&#26032;&#30340;&#12290;&#20320;&#21487;&#20197;&#20351;&#29992;&#20197;&#19979;&#21629;&#20196;&#26469;&#26356;&#26032;&#23427;&#20204;&#65306;<\/p>\n<pre><code class=\"language-bash\">composer update\nphp -v<\/code><\/pre>\n<h3>4. &#37197;&#32622; Nginx<\/h3>\n<p>&#22914;&#26524;&#20320;&#36824;&#27809;&#26377;&#37197;&#32622; Nginx&#65292;&#21487;&#20197;&#25353;&#29031;&#20197;&#19979;&#27493;&#39588;&#36827;&#34892;&#65306;<\/p>\n<ol>\n<li>\n<p><strong>&#23433;&#35013; Nginx<\/strong>&#65306;<\/p>\n<pre><code class=\"language-bash\">sudo apt-get update\nsudo apt-get install nginx<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#37197;&#32622; Nginx<\/strong>&#65306;\n&#32534;&#36753; <code>\/etc\/nginx\/sites-available\/default<\/code> &#25991;&#20214;&#65292;&#28155;&#21152;&#20197;&#19979;&#20869;&#23481;&#65306;<\/p>\n<pre><code class=\"language-nginx\">server {\n   listen 80;\n   server_name yourserver.example.com;\n\n   root \/path\/to\/your\/laravel\/project\/public;\n   index index.php index.html index.htm;\n\n   location \/ {\n       try_files $uri $uri\/ =404;\n   }\n\n   location ~ .php$ {\n       include snippets\/fastcgi-php.conf;\n       fastcgi_pass unix:\/run\/php\/php7.4-fpm.sock;\n   }\n}<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#21551;&#29992;&#31449;&#28857;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-bash\">sudo ln -s \/etc\/nginx\/sites-available\/default \/etc\/nginx\/sites-enabled\/<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#27979;&#35797; Nginx &#37197;&#32622;<\/strong>&#65306;<\/p>\n<pre><code class=\"language-bash\">sudo nginx -t<\/code><\/pre>\n<\/li>\n<li>\n<p><strong>&#37325;&#21551; Nginx<\/strong>&#65306;<\/p>\n<pre><code class=\"language-bash\">sudo systemctl restart nginx<\/code><\/pre>\n<\/li>\n<\/ol>\n<h3>5. &#27979;&#35797; CI\/CD<\/h3>\n<p>&#29616;&#22312;&#65292;&#20320;&#21487;&#20197;&#36890;&#36807;&#25552;&#20132;&#26356;&#25913;&#21040; GitLab &#20027;&#20998;&#25903;&#26469;&#35302;&#21457; CI\/CD &#27969;&#31243;&#12290;&#24403;&#20195;&#30721;&#34987;&#25512;&#36865;&#21040; <code>master<\/code> &#20998;&#25903;&#26102;&#65292;GitLab CI\/CD &#23558;&#33258;&#21160;&#36816;&#34892;&#26500;&#24314;&#12289;&#27979;&#35797;&#21644;&#37096;&#32626;&#38454;&#27573;&#12290;<\/p>\n<h3>&#31034;&#20363;&#20195;&#30721;<\/h3>\n<p>&#20197;&#19979;&#26159;&#19968;&#20010;&#31616;&#21333;&#30340;&#31034;&#20363;&#20195;&#30721;&#65292;&#23637;&#31034;&#20102;&#22914;&#20309;&#22312; Laravel &#20013;&#20351;&#29992; Composer &#21644; PHPUnit &#36827;&#34892;&#21333;&#20803;&#27979;&#35797;&#65306;<\/p>\n<h4>&#21019;&#24314;&#19968;&#20010;&#27979;&#35797;&#31867;<\/h4>\n<p>&#22312; <code>tests\/Unit<\/code> &#30446;&#24405;&#19979;&#21019;&#24314;&#19968;&#20010;&#26032;&#30340;&#27979;&#35797;&#31867;&#65292;&#20363;&#22914; <code>UserTest.php<\/code>&#65306;<\/p>\n<pre><code class=\"language-php\">&lt;?php\n\nnamespace TestsUnit;\n\nuse AppUser;\nuse IlluminateFoundationTestingTestCase;\n\nclass UserTest extends TestCase\n{\n    public function test_create_user()\n    {\n        $user = factory(User::class)-&gt;create();\n\n        $this-&gt;assertTrue($user-&gt;exists);\n    }\n}<\/code><\/pre>\n<h4>&#36816;&#34892;&#27979;&#35797;<\/h4>\n<p>&#22312;&#32456;&#31471;&#20013;&#36816;&#34892;&#20197;&#19979;&#21629;&#20196;&#26469;&#25191;&#34892;&#27979;&#35797;&#65306;<\/p>\n<pre><code class=\"language-bash\">.\/vendor\/bin\/phpunit tests\/Unit\/UserTest.php<\/code><\/pre>\n<p>&#36890;&#36807;&#20197;&#19978;&#27493;&#39588;&#65292;&#20320;&#21487;&#20197;&#22312; Laravel &#39033;&#30446;&#20013;&#25104;&#21151;&#23454;&#29616; CI\/CD &#29615;&#22659;&#12290;&#26681;&#25454;&#20320;&#30340;&#20855;&#20307;&#38656;&#27714;&#65292;&#20320;&#21487;&#33021;&#38656;&#35201;&#36827;&#19968;&#27493;&#37197;&#32622;&#21644;&#25193;&#23637;&#36825;&#20123;&#27493;&#39588;&#12290;<\/p>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--2\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/zp-400x300.jpg\" alt=\"&#40657;&#26495;Bug&#35762;&#24072;\" class=\"wp-image-1849\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading my-0\" style=\"font-size:clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.175), 1rem);\">&#40657;&#26495;Bug&#35762;&#24072;<\/h2>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<body><h2>&#27010;&#35272;<\/h2><p>&#22312;&#36719;&#20214;&#24320;&#21457;&#30340;&#19990;&#30028;&#37324;&#65292;CI\/CD&#65288;&#25345;&#32493;&#38598;&#25104;\/&#25345;&#32493;&#37096;&#32626;&#65289;&#23545;&#20110;&#19981;&#26029;&#36845;&#20195;&#21644;&#25913;&#36827;&#20195;&#30721;&#33267;&#20851;&#37325;&#35201;&#12290;&#23545;&#20110;Laravel&#65292;&#19968;&#20010;&#26368;&#21463;&#27426;&#36814;&#30340;PHP&#26694;&#26550;&#65292;&#23454;&#26045;CI\/CD&#21487;&#20197;&#26174;&#33879;&#31616;&#21270;&#24320;&#21457;&#27969;&#31243;&#65292;&#30830;&#20445;&#25152;&#26377;&#26032;&#25552;&#20132;&#30340;&#20195;&#30721;&#37117;&#33021;&#33258;&#21160;&#19988;&#21487;&#38752;&#22320;&#37096;&#32626;&#26356;&#25913;&#12290;&#22312;&#36825;&#31687;&#25991;&#31456;&#20013;&#65292;&#25105;&#20204;&#23558;&#20174;&#22836;&#21040;&#23614;&#20171;&#32461;&#22914;&#20309;&#20026;Laravel&#24212;&#29992;&#35774;&#32622;CI\/CD&#31649;&#36947;&#12290;<\/p><h3>&#20026;&#20160;&#20040;&#20351;&#29992;CI\/CD&#65311;<\/h3><p>&#25345;&#32493;&#38598;&#25104;&#65288;Continuous Integration&#65292;CI&#65289;&#21644;&#25345;&#32493;&#37096;&#32626;&#65288;Continuous Deployment&#65292;CD&#65289;&#36890;&#36807;&#33258;&#21160;&#21270;&#26500;&#24314;&#12289;&#27979;&#35797;&#21644;&#37096;&#32626;&#36807;&#31243;&#26469;&#36830;&#25509;&#24320;&#21457;&#22242;&#38431;&#21644;&#36816;&#33829;&#22242;&#38431;&#12290;&#22312;CI\/CD&#30340;&#26368;&#20339;&#23454;&#36341;&#19979;&#65292;&#21487;&#20197;&#26174;&#33879;&#20943;&#23569;&#20026;&#21457;&#24067;&#24341;&#20837;&#26356;&#25913;&#25152;&#38656;&#30340;&#26102;&#38388;&#65292;&#24182;&#20801;&#35768;&#26356;&#39057;&#32321;&#22320;&#36827;&#34892;&#21457;&#24067;&#12290;<\/p><p>&#22312;&#36825;&#20010;&#25945;&#31243;&#20013;&#65292;&#25105;&#20204;&#23558;&#28145;&#20837;&#25506;&#35752;&#65306;<\/p><p>&#33258;&#21160;&#21270;&#37096;&#32626;&#21040;&#29983;&#20135;&#26381;&#21153;&#22120;&#12290;<\/p><p>&#20351;&#29992;GitHub Actions&#37197;&#32622;&#25345;&#32493;&#38598;&#25104;&#26381;&#21153;&#12290;<\/p><p>&#21019;&#24314;&#19968;&#20010;&#27979;&#35797;&#29615;&#22659;&#20351;&#29992;PHPUnit&#12290;<\/p><p>&#35774;&#32622;&#20351;&#29992;Git&#21644;GitHub&#30340;&#29256;&#26412;&#25511;&#21046;&#31995;&#32479;&#12290;<\/p><h3>&#20808;&#20915;&#26465;&#20214;<\/h3><p>&#37096;&#32626;&#35775;&#38382;&#26435;&#38480;&#65288;&#20363;&#22914;&#65292;DigitalOcean droplet&#65289;<\/p><p>&#19968;&#20010;GitHub&#36134;&#25143;<\/p><p>&#19968;&#20010;Laravel&#24212;&#29992;&#31243;&#24207;&#12290;<\/p><h2>&#35774;&#32622;&#19968;&#20010;&#20179;&#24211;<\/h2><p>&#39318;&#20808;&#65292;&#20320;&#38656;&#35201;&#23558;&#20320;&#30340;Laravel&#24212;&#29992;&#23384;&#20648;&#22312;Git&#20179;&#24211;&#20013;&#12290;&#22914;&#26524;&#20320;&#36824;&#27809;&#26377;&#21021;&#22987;&#21270;Git&#21040;&#20320;&#30340;Laravel&#39033;&#30446;&#65292;&#35831;&#22312;&#39033;&#30446;&#30446;&#24405;&#20013;&#36816;&#34892;&#20197;&#19979;&#21629;&#20196;&#65306;<\/p><pre><code>git init\n git add .\n git commit -m \"Initial commit\"\n<\/code><\/pre><p>&#25509;&#19979;&#26469;&#65292;&#22312;GitHub&#19978;&#21019;&#24314;&#19968;&#20010;&#26032;&#30340;&#20179;&#24211;&#65292;&#24182;&#23558;&#20854;&#26412;&#22320;&#20179;&#24211;&#19982;&#35813;&#36828;&#31243;&#20179;&#24211;&#36827;&#34892;&#38142;&#25509;&#65306;<\/p><pre><code>git remote add origin your-repository-url\n git push -u origin master\n<\/code><\/pre><h2>&#20351;&#29992;PHPUnit&#36827;&#34892;&#33258;&#21160;&#21270;&#27979;&#35797;<\/h2><p>Laravel&#33258;&#24102;&#20102;&#23545;PHPUnit&#30340;&#20869;&#32622;&#25903;&#25345;&#36827;&#34892;&#27979;&#35797;&#12290;&#33258;&#21160;&#21270;&#27979;&#35797;&#23545;&#20110;&#33391;&#22909;&#30340;CI\/CD&#31649;&#36947;&#33267;&#20851;&#37325;&#35201;&#65292;&#30830;&#20445;&#27599;&#27425;&#26356;&#25913;&#37117;&#36890;&#36807;&#24517;&#35201;&#30340;&#36136;&#37327;&#26816;&#26597;&#12290;&#40664;&#35748;&#30340;Laravel&#35774;&#32622;&#21253;&#25324;&#19968;&#20010;&#31034;&#20363;&#27979;&#35797;&#65292;&#20320;&#21487;&#20197;&#36816;&#34892;&#23427;&#65306;<\/p><pre><code>php artisan test\n<\/code><\/pre><p>&#29616;&#26377;&#27979;&#35797;&#25991;&#20214;&#20301;&#20110;tests&#30446;&#24405;&#19979;&#12290;&#20320;&#24212;&#35813;&#20026;&#24212;&#29992;&#31243;&#24207;&#30340;&#21151;&#33021;&#32534;&#20889;&#27979;&#35797;&#29992;&#20363;&#12290;&#36825;&#37324;&#26377;&#19968;&#20010;&#31616;&#21333;&#30340;&#31034;&#20363;&#65306;<\/p><pre><code>public function testBasicTest()\n{\n    $response = $this-&gt;get('\/');\n    $response-&gt;assertStatus(200);\n}\n<\/code><\/pre><p>&#28155;&#21152;&#27979;&#35797;&#21518;&#65292;&#23558;&#20854;&#25552;&#20132;&#21040;&#20179;&#24211;&#65306;<\/p><pre><code>git add .\n git commit -m 'Added tests'\n git push origin master\n<\/code><\/pre><h2>&#35774;&#32622;&#19982;GitHub Actions&#38598;&#25104;&#30340;&#25345;&#32493;&#38598;&#25104;&#65288;Continuous Integration&#65292;CI&#65289;&#12290;<\/h2><p>&#19979;&#19968;&#27493;&#26159;&#37197;&#32622;GitHub Actions&#65292;&#36825;&#21487;&#20197;&#22312;GitHub&#24179;&#21488;&#19978;&#30452;&#25509;&#25552;&#20379;CI\/CD&#21151;&#33021;&#12290;&#20320;&#38656;&#35201;&#22312;&#20320;&#30340;&#20179;&#24211;&#20013;&#21019;&#24314;&#19968;&#20010;&#21517;&#20026;.laravel.yml&#30340;&#25991;&#20214;&#65292;&#24182;&#28155;&#21152;&#19968;&#20010;&#26032;&#30340;YAML&#25991;&#20214;&#26469;&#23450;&#20041;&#20320;&#30340;&#24037;&#20316;&#27969;&#12290;<\/p><pre><code>name: Laravel CI\n\non: [push]\n\njobs:\n  build:\n\n    runs-on: ubuntu-latest\n\n    steps:\n    - uses: actions\/checkout@v2\n    - name: Install Dependencies\n      run: composer install --no-progress\n    - name: Run Tests\n      run: php artisan test\n<\/code><\/pre><p>&#22312;&#36825;&#31181;&#22522;&#26412;&#35774;&#32622;&#19979;&#65292;&#27599;&#27425;&#25512;&#36865;&#21040;&#20179;&#24211;&#26102;&#65292;&#37117;&#20250;&#35302;&#21457;&#19968;&#20010;&#24037;&#20316;&#27969;&#25191;&#34892;&#65292;&#35813;&#24037;&#20316;&#27969;&#20250;&#20811;&#38534;&#20179;&#24211;&#12289;&#23433;&#35013;&#20381;&#36182;&#39033;&#24182;&#36816;&#34892;&#27979;&#35797;&#12290;&#22914;&#26524;&#20219;&#20309;&#27493;&#39588;&#22833;&#36133;&#65292;&#21017;&#24037;&#20316;&#27969;&#23558;&#20572;&#27490;&#65292;&#24182;&#19988;GitHub&#20250;&#26174;&#31034;&#25512;&#36865;&#20026;&#26410;&#25104;&#21151;&#12290;<\/p><h2>&#33258;&#21160;&#21270;Laravel&#37096;&#32626;<\/h2><p>&#29616;&#22312;CI&#24050;&#32463;&#21040;&#20301;&#65292;&#20320;&#21487;&#20197;&#28155;&#21152;&#27493;&#39588;&#21040;&#24037;&#20316;&#27969;&#20013;&#22788;&#29702;CD&#12290;&#37096;&#32626;&#21487;&#20197;&#31616;&#21333;&#20063;&#21487;&#20197;&#22797;&#26434;&#65292;&#21462;&#20915;&#20110;&#26381;&#21153;&#22120;&#37197;&#32622;&#30340;&#38656;&#27714;&#12290;&#19968;&#20010;&#22522;&#26412;&#30340;&#37096;&#32626;&#27493;&#39588;&#21487;&#33021;&#21253;&#25324;SSH&#36830;&#25509;&#21040;&#26381;&#21153;&#22120;&#24182;&#20174;Git&#25289;&#21462;&#26368;&#26032;&#26356;&#25913;&#12290;<\/p><p>&#22312;workflow&#25991;&#20214;&#20013;&#28155;&#21152;&#20197;&#19979;&#27493;&#39588;&#65306;<\/p><pre><code>- name: Deploy to Production\n  if: github.ref == 'refs\/heads\/master'\n  uses: appleboy\/ssh-action@master\n  with:\n    host: ${{ secrets.DEPLOY_SERVER }}\n    username: ${{ secrets.DEPLOY_USER }}\n    password: ${{ secrets.DEPLOY_PASSWORD }}\n    script: | \n      cd path-to-your-laravel-app\n      git pull origin master\n      composer install --no-dev --optimize-autoloader\n      php artisan migrate --force\n<\/code><\/pre><p>&#20026;&#20102;&#30830;&#20445;&#27492;&#25805;&#20316;&#30340;&#23433;&#20840;&#65292;&#24744;&#24212;&#23558;&#26381;&#21153;&#22120;&#36830;&#25509;&#35814;&#32454;&#20449;&#24687;&#23384;&#20648;&#22312;GitHub&#20179;&#24211;&#35774;&#32622;&#20013;&#30340;&#23494;&#38053;&#20013;&#65292;&#32780;&#19981;&#26159;workflow&#25991;&#20214;&#26412;&#36523;&#20013;&#12290;<\/p><h2>&#32500;&#25252;&#21644;&#22238;&#28378;<\/h2><p>&#33391;&#22909;&#30340;CI\/CD&#23454;&#36341;&#19981;&#20165;&#20851;&#27880;&#37096;&#32626;&#65292;&#36824;&#21253;&#25324;&#21046;&#23450;&#24212;&#29992;&#32500;&#25252;&#21644;&#22238;&#28378;&#31574;&#30053;&#12290;&#22788;&#29702;&#25968;&#25454;&#24211;&#36801;&#31227;&#12289;&#22791;&#20221;&#21644;&#23384;&#20648;&#36164;&#20135;&#31561;&#37117;&#26159;&#37325;&#35201;&#32771;&#34385;&#22240;&#32032;&#12290;&#34429;&#28982;&#26412;&#25945;&#31243;&#19981;&#28085;&#30422;&#36825;&#20123;&#26041;&#38754;&#65292;&#20294;&#35831;&#21153;&#24517;&#20102;&#35299;&#65292;&#31283;&#23450;&#37096;&#32626;&#24212;&#32771;&#34385;&#21040;&#36825;&#20123;&#38382;&#39064;&#12290;<\/p><p>&#20063;&#26377;&#19987;&#38376;&#38024;&#23545;Laravel&#30340;&#37096;&#32626;&#26381;&#21153;&#65292;&#27604;&#22914;Envoyer&#65292;&#23427;&#21487;&#20197;&#22788;&#29702;&#38646;&#20572;&#26426;&#37096;&#32626;&#21644;&#21487;&#33021;&#34917;&#20805;CI\/CD&#31649;&#36947;&#20013;&#24120;&#35265;&#20219;&#21153;&#30340;&#33258;&#21160;&#21270;&#24037;&#20316;&#12290;<\/p><h2>&#32467;&#35770;<\/h2><p>&#35774;&#32622;CI\/CD&#31649;&#36947;&#26159;&#19968;&#39033;&#25237;&#36164;&#65292;&#20854;&#22238;&#25253;&#24040;&#22823;&#12290;&#23427;&#22686;&#24378;&#20102;&#21457;&#24067;&#27969;&#31243;&#30340;&#20449;&#24515;&#65292;&#40723;&#21169;&#27979;&#35797;&#65292;&#24182;&#21152;&#36895;&#24320;&#21457;&#21608;&#26399;&#12290;&#25353;&#29031;&#26412;&#25945;&#31243;&#20013;&#30340;&#27493;&#39588;&#36827;&#34892;&#25805;&#20316;&#65292;&#24744;&#23558;&#36367;&#19978;&#26356;&#39640;&#25928;&#12289;&#21487;&#38752;&#21644;&#19987;&#19994;Laravel&#24320;&#21457;&#24037;&#20316;&#27969;&#30340;&#36947;&#36335;&#12290;<\/p><\/body>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div><div class=\"wp-block-columns p-0 border is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-columns px-4 py-3 border-bottom has-background is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\" style=\"background:linear-gradient(243deg,rgb(238,238,238) 0%,rgba(58,166,242,0.15) 100%)\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6c531013 wp-block-group-is-layout-flex\">\r\n<figure class=\"wp-block-image size-thumbnail is-resized is-style-rounded is-style-rounded--3\"><img decoding=\"async\" src=\"https:\/\/www.zhaozhao123.cn\/myitems\/images\/sites16\/2025\/06\/xygcfznnzczhsdmwydzhsmzzzmddnq-400x300.jpg\" alt=\"&#38271;&#24037;&#30721;&#22900;1523\" class=\"wp-image-2906\" style=\"object-fit:cover;width:30px;height:30px\"><\/figure>\r\n\r\n\r\n\r\n<h2 class=\"wp-block-heading my-0\" style=\"font-size:clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.175), 1rem);\">&#38271;&#24037;&#30721;&#22900;1523<\/h2>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n\r\n\r\n\r\n<div class=\"wp-block-columns px-xl-5 px-4 py-xl-4 py-3 is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\r\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\r\n<p>&#22312; Laravel &#20013;&#23454;&#29616; CI\/CD&#65288;&#25345;&#32493;&#38598;&#25104;\/&#25345;&#32493;&#37096;&#32626;&#65289;&#26159;&#19968;&#31181;&#39640;&#25928;&#19988;&#21487;&#38752;&#30340;&#26041;&#27861;&#65292;&#21487;&#20197;&#24110;&#21161;&#22242;&#38431;&#33258;&#21160;&#21270;&#26500;&#24314;&#21644;&#27979;&#35797;&#36807;&#31243;&#65292;&#24182;&#30830;&#20445;&#27599;&#27425;&#21457;&#24067;&#37117;&#33021;&#28385;&#36275;&#25152;&#26377;&#39044;&#26399;&#30340;&#36136;&#37327;&#26631;&#20934;&#12290;&#20197;&#19979;&#26159;&#22312; Laravel &#20013;&#23454;&#29616; CI\/CD &#30340;&#23454;&#36341;&#25351;&#21335;&#65306;<\/p>\n<h3>1. &#35774;&#32622; CI\/CD &#37197;&#32622;<\/h3>\n<h4>&#20351;&#29992; GitLab CI&#65306;<\/h4>\n<p>&#39318;&#20808;&#65292;&#20320;&#38656;&#35201;&#35774;&#32622; GitLab &#20316;&#20026; CI\/CD &#26381;&#21153;&#22120;&#12290;&#30331;&#24405;&#21040;&#20320;&#30340; GitLab &#25511;&#21046;&#21488;&#24182;&#21019;&#24314;&#19968;&#20010;&#26032;&#30340;&#39033;&#30446;&#12290;<\/p>\n<pre><code class=\"language-bash\">git init\ngit add . --all\ngit commit -m \"Initial commit\"<\/code><\/pre>\n<p>&#28982;&#21518;&#65292;&#20351;&#29992; <code>git push<\/code> &#23558;&#24403;&#21069;&#29366;&#24577;&#25512;&#36865;&#21040;&#36828;&#31243;&#20179;&#24211;&#12290;<\/p>\n<p>&#25509;&#19979;&#26469;&#65292;&#37197;&#32622; GitLab CI &#26469;&#35302;&#21457;&#26500;&#24314;&#12290;&#22312; <code>settings.toml<\/code> &#25991;&#20214;&#30340; <code>[ci]<\/code> &#33410;&#28857;&#19979;&#28155;&#21152;&#20197;&#19979;&#37197;&#32622;&#65306;<\/p>\n<pre><code class=\"language-toml\">[ci]\n# ... &#20854;&#20182;&#36873;&#39033; ...\n\n# &#36816;&#34892;&#21629;&#20196;\nbuild:\n  image: php:7.4-fpm\n  script:\n    - composer install\n    - php artisan migrate --seed\n    # &#22686;&#21152;&#20854;&#20182;&#38656;&#35201;&#36816;&#34892;&#30340;&#21629;&#20196;...<\/code><\/pre>\n<p>&#36825;&#20010;&#37197;&#32622;&#23558;&#20351;&#29992; PHP &#26500;&#24314;&#24037;&#20855;&#23433;&#35013; Composer &#24182;&#25191;&#34892;&#25968;&#25454;&#24211;&#36801;&#31227;&#12290;<\/p>\n<h4>&#20351;&#29992; Jenkins&#65306;<\/h4>\n<p>&#23545;&#20110; Jenkins&#65292;&#20320;&#21487;&#20197;&#21019;&#24314;&#19968;&#20010;&#26032;&#30340; Jenkinsfile&#65292;&#20363;&#22914; <code>Dockerfile<\/code>&#12290;&#22312;&#36825;&#20010;&#25991;&#20214;&#20013;&#65292;&#20320;&#24212;&#35813;&#21015;&#20986;&#35201;&#36816;&#34892;&#30340; Docker &#23481;&#22120;&#21644;&#21551;&#21160;&#23481;&#22120;&#30340;&#21629;&#20196;&#12290;&#20363;&#22914;&#65306;<\/p>\n<pre><code class=\"language-yaml\">stages:\n- build\n- deploy\n\nbuild:\nimage: node:12\n\nrun:\n  command: npm ci &amp;&amp; npm run test\n\ndeploy:\n  stage: deploy\n  image: nginx:latest\n  script:\n    - echo \"Deployment complete.\"<\/code><\/pre>\n<p>&#36825;&#23558;&#22312;&#27599;&#20010;&#26500;&#24314;&#38454;&#27573;&#21518;&#36816;&#34892; <code>npm ci<\/code> &#21644; <code>npm run test<\/code>&#65292;&#24182;&#22312;&#37096;&#32626;&#38454;&#27573;&#20043;&#21518;&#36816;&#34892; <code>echo \"Deployment complete.\"<\/code>&#12290;<\/p>\n<h3>2. &#23454;&#29616;&#33258;&#21160;&#27979;&#35797;&#21644;&#21333;&#20803;&#27979;&#35797;<\/h3>\n<p>Laravel &#25552;&#20379;&#20102;&#21508;&#31181;&#33258;&#21160;&#21270;&#27979;&#35797;&#26694;&#26550;&#65292;&#22914; Laravel &#21333;&#20803;&#27979;&#35797; (<code>unit<\/code>) &#21644; Laravel &#26694;&#26550;&#27979;&#35797;&#24211; (<code>phpunit<\/code>). &#22312; CI\/CD &#27969;&#31243;&#20013;&#65292;&#36825;&#20123;&#27979;&#35797;&#24212;&#35813;&#23450;&#26399;&#34987;&#35302;&#21457;&#12290;<\/p>\n<pre><code class=\"language-php\">\/\/ &#22312; Laravel &#24212;&#29992;&#30446;&#24405;&#19979;&#30340; `tests` &#30446;&#24405;&#19979;&#21019;&#24314;&#19968;&#20010;&#27979;&#35797;&#31867;&#12290;\nclass TestControllerTest extends TestCase\n{\n    public function testAdd()\n    {\n        $this-&gt;post('\/add', ['value' =&gt; 5, 'operator' =&gt; '+']);\n        $response = $this-&gt;client-&gt;get('\/');\n\n        \/\/ &#30830;&#20445;&#21709;&#24212;&#26159;&#25104;&#21151;&#30340;&#65292;&#24182;&#26816;&#26597;&#36820;&#22238;&#30340;&#20540;&#26159;&#21542;&#19982;&#39044;&#26399;&#30456;&#31526;&#12290;\n        $this-&gt;assertEquals(6, $response-&gt;getStatusCode());\n    }\n}<\/code><\/pre>\n<h3>3. &#25191;&#34892; CI\/CD &#27969;&#31243;<\/h3>\n<h4>&#20351;&#29992; GitLab CI&#65306;<\/h4>\n<p>&#22312; GitLab &#25511;&#21046;&#21488;&#19978;&#65292;&#20320;&#21487;&#20197;&#36890;&#36807;&#36816;&#34892; <code>gitlab-ci.yml<\/code> &#25991;&#20214;&#26469;&#23450;&#20041; CI\/CD &#27969;&#31243;&#12290;&#20363;&#22914;&#65292;&#22914;&#26524;&#20320;&#24819;&#35201;&#22312;&#27599;&#27425;&#25552;&#20132;&#26102;&#35302;&#21457;&#26500;&#24314;&#21644;&#37096;&#32626;&#65292;&#21487;&#20197;&#36825;&#26679;&#35774;&#32622;&#65306;<\/p>\n<pre><code class=\"language-yaml\">\nstages:\n  - build\n  - deploy\n\nbuild:\n  image: php:7.4-fpm\n  script:\n    - composer install\n    - php artisan migrate --seed\n\ndeploy:\n  stages:\n  - deploy-pre\n  - deploy-post\n  only:\n    - master\n  when:\n    on:\n      branch: [master]\n  script:\n    - echo \"Deploying to production...\"\n    - git pull origin master\n    - docker-compose up -d\n    - php artisan serve\n    - sleep 60\n    - php artisan cache:clear\n    - php artisan route:cache\n    - php artisan config:clear\n    - php artisan view:clear\n    - php artisan storage:link\n    - php artisan optimize\n    - php artisan optimize:clear\n    - php artisan migrate\n    - php artisan db:seed\n    - php artisan test\n    - php artisan garbagemanage:clear\n    - php artisan garbagemanage:flush\n    - php artisan garbagemanage:clean\n    - php artisan garbagemanage:schedule:queue\n    - php artisan garbagemanage:purge\n    - php artisan garbagemanage:reindex\n    - php artisan garbagemanage:reset\n    - php artisan garbagemanage:force\n    - php artisan garbagemanage:recycle\n    - php artisan garbagemanage:recycle-all\n    - php artisan garbagemanage:restore\n    - php artisan garbagemanage:clear-cache\n    - php artisan garbagemanage:clear-cache-all\n    - php artisan garbagemanage:clear-sessions\n    - php artisan garbagemanage:clear-storage\n    - php artisan garbagemanage:clear-config\n    - php artisan garbagemanage:clear-view\n    - php artisan garbagemanage:clear-mail\n    - php artisan garbagemanage:clear-analytics\n    - php artisan garbagemanage:clear-logs\n    - php artisan garbagemanage:clear-tests\n    - php artisan garbagemanage:clear-cors\n    - php artisan garbagemanage:clear-bundles\n    - php artisan garbagemanage:clear-bundle-settings\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage:clear-bundle-policies\n    - php artisan garbagemanage:clear-bundle-services\n    - php artisan garbagemanage:clear-bundle-authenticators\n    - php artisan garbagemanage:clear-bundle-throttlers\n    - php artisan garbagemanage:clear-bundle-passwords\n    - php artisan garbagemanage:clear-bundle-emails\n    - php artisan garbagemanage:clear-bundle-views\n    - php artisan garbagemanage:clear-bundle-sessions\n    - php artisan garbagemanage:clear-bundle-cors\n    - php artisan garbagemanage:clear-bundle-routes\n    - php artisan garbagemanage:clear-bundle-resources\n    - php artisan garbagemanage:clear-bundle-managers\n    - php artisan garbagemanage:clear-bundle-migrations\n    - php artisan garbagemanage:clear-bundle-seeds\n    - php artisan garbagemanage:clear-bundle-tasks\n    - php artisan garbagemanage:clear-bundle-models\n    - php artisan garbagemanage:clear-bundle-forms\n    - php artisan garbagemanage<\/code><\/pre>\r\n<\/div>\r\n<\/div>\r\n<\/div>\r\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Bug&#32534;&#35793;&#29422; &#22312; Laravel &#20013;&#23454;&#29616;&#25345;&#32493;&#38598;&#25104;&#65288;CI&#65289;&#21644;&#25345;&#32493;&#37096;&#32626;&#038;..<\/p>\n","protected":false},"author":1,"featured_media":0,"menu_order":0,"template":"","meta":{"_acf_changed":false},"tags":[],"my1js2nav":[44],"tuisongtax":[],"class_list":["post-871","my1js","type-my1js","status-publish","hentry","my1js2nav-laravel"],"acf":{"qian_art_seotitle":"","qian_art_seotitle_source":{"label":"SEO\u6807\u9898","type":"text","formatted_value":""},"qian_art_seokws":"","qian_art_seokws_source":{"label":"SEO\u5173\u952e\u8bcd","type":"text","formatted_value":""},"qian_art_stzhong":"","qian_art_stzhong_source":{"label":"\u4e2d | \u77ed\u6807\u9898","type":"text","formatted_value":""}},"_links":{"self":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js\/871","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js"}],"about":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/types\/my1js"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/users\/1"}],"wp:attachment":[{"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/media?parent=871"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/tags?post=871"},{"taxonomy":"my1js2nav","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/my1js2nav?post=871"},{"taxonomy":"tuisongtax","embeddable":true,"href":"https:\/\/www.zhaozhao123.cn\/php\/wp-json\/wp\/v2\/tuisongtax?post=871"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}