<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                ##路由文件 每個模塊都包含自己的路由文件,均位于 Routes 下,默認情況下包含以下四個 ~~~ admin.php // 后臺路由 api.php //api路由 front.php // 前臺路由 console.php //命令行路由 ~~~ ## 后臺路由 admin.php ~~~ <?php use Illuminate\Routing\Router; // Test 模塊后臺路由 $router->group(['prefix'=>'test', 'module'=>'test'], function (Router $router) { // test group example $router->group(['prefix' =>'test'], function (Router $router) { $router->get('index','TestController@index')->name('test.test.index')->middleware('allow:test.test.index'); $router->get('create','TestController@create')->name('test.test.create')->middleware('allow:test.test.create'); $router->post('store','TestController@store')->name('test.test.store')->middleware('allow:test.test.store'); $router->get('show/{id}','TestController@show')->name('test.test.show')->middleware('allow:test.test.show'); $router->get('edit/{id}','TestController@edit')->name('test.test.edit')->middleware('allow:test.test.edit'); $router->put('update/{id}','TestController@update')->name('test.test.update')->middleware('allow:test.test.update'); $router->delete('destroy/{id}','TestController@destroy')->name('test.test.destroy')->middleware('allow:test.test.destroy'); }); }); ~~~ 每個控制器都建議使用路由分組 后臺部分每個路由都包含: 路由名稱:name 權限控制:middleware('allow:test.index'); 路由分組里面增加了 'module'=>'test' 項,用于識別模塊,其他和laravel并無區別 備注1:不支持 laravel中route的resouce方法 備注2:可以在控制器建好后,使用 開發助手-模塊開發助手-模塊-控制器,找到對應的控制器,查看路由參考,復制并粘貼 ## 前臺路由 front.php 類似于admin路由,參考上面文檔 ``` <?php use Illuminate\Routing\Router; // Core 模塊前臺路由 $router->group(['prefix' =>'/','module'=>'core'], function (Router $router) { $router->get('/', 'IndexController@index')->name('index'); $router->get('cms', 'IndexController@index')->name('cms'); }); ``` ## Api路由 api.php 參考上面文檔 ## 命令行路由:console.php 可以參考laravel的命令行路由,代碼示例,增加 php artisan zotop:version 和 php artisan thumbnail:clear命令 ``` <?php /** * 顯示當前版本信息 */ Artisan::command('zotop:version', function () { $name = $this->laravel['config']->get('zotop.name'); $version = $this->laravel['config']->get('zotop.version'); $release = $this->laravel['config']->get('zotop.release'); $this->info($name.' version:'.$version.'('.$release.')'); })->describe('Show the version of zotop'); /** * 清理圖片縮略圖 */ Artisan::command('thumbnail:clear', function () { $dir = public_path('thumbnails'); foreach ($this->laravel['files']->directories($dir) as $subdir) { $this->laravel['files']->deleteDirectory($subdir); } $this->info('Image thumbnail files cleared!'); })->describe('Clear the image thumbnail files'); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看