PHPackages                             javck/easyweb2 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. javck/easyweb2

ActiveLiberary[Utility &amp; Helpers](/categories/utility)

javck/easyweb2
==============

Easy learning guide to Laravel + Voyager

285PHPCI failing

Since Nov 5Pushed 5y agoCompare

[ Source](https://github.com/javck/package_easyweb2)[ Packagist](https://packagist.org/packages/javck/easyweb2)[ RSS](/packages/javck-easyweb2/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![](https://camo.githubusercontent.com/88a3ba1e6d046856a32707bf0a7c1b954e69274f507d22605675f6413b7a3ff1/687474703a2f2f64656d6f2e676f626c696e6c61622e6f72672f73746f726167652f73657474696e67732f4a756c79323031392f55714830734a36757350446c5a705979374535662e706e67)](http://goblinlab.org)

\*\*EzLaravel - 教您如何快速入門Laravel + Voyager的極速開發術 ❤️ by [Goblin Lab Studio](http://goblinlab.org)
===============================================================================================

[](#ezlaravel---教您如何快速入門laravel--voyager的極速開發術-️-by-goblin-lab-studio)

架構於Laravel框架，針對Voyager套件加以擴展的快速開發術 陪著你一起快速入門Laravel

[![Voyager Screenshot](https://camo.githubusercontent.com/db4ab326d29dcd7ba338cfdb211d80468c31b2ce211b45b606637059d2f89c75/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f746865636f6e74726f6c67726f75702f766f79616765722d73637265656e73686f742e706e67)](https://camo.githubusercontent.com/db4ab326d29dcd7ba338cfdb211d80468c31b2ce211b45b606637059d2f89c75/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f746865636f6e74726f6c67726f75702f766f79616765722d73637265656e73686f742e706e67)

Website &amp; Documentation:

Video Tutorial Here:

Join our Slack chat:

View the Voyager Cheat Sheet:

Canvas Template:

---

支持 Laravel 8

PS:此套件使用到第三方的Bootstrap4 Template :Moderna 版權仍屬原開發者所有，如需自行下載可參考以下網址

可安裝Laravel最新版本，可使用以下指令來建立 PS：如需輸入指令，均需要切換到Terminal，並跳到專案根目錄資料夾

安裝步驟
----

[](#安裝步驟)

### 1.(可選)如為新專案，需要在AppServiceProvider.php的boot()裡加入 Schema::defaultStringLength(191);

[](#1可選如為新專案需要在appserviceproviderphp的boot裡加入-schemadefaultstringlength191)

### 2.(可選)設定config/app.php，主要是locale改為zh\_TW

[](#2可選設定configappphp主要是locale改為zh_tw)

### 3.載入套件javck/Ezlaravel

[](#3載入套件javckezlaravel)

```
正式環境 composer require javck/Ezlaravel
測試環境 composer require javck/Ezlaravel --dev
```

### 4.(可選)可載入DebuggerBar

[](#4可選可載入debuggerbar)

```
composer require barryvdh/laravel-debugbar --dev
```

### 5.安裝Voyager套件

[](#5安裝voyager套件)

```
php artisan voyager:install
```

### 6.移除routes/web.php裡頭的voyager路由，並加入以下程式碼

[](#6移除routeswebphp裡頭的voyager路由並加入以下程式碼)

```
Route::get('admin/login', ['uses' => 'Auth\VoyagerAuthController@login', 'as' => 'voyager.login']);
Route::post('admin/login', ['uses' => 'Auth\VoyagerAuthController@postLogin', 'as' => 'voyager.postlogin']);
Route::post('admin/logout', ['uses' => 'Auth\VoyagerAuthController@logout', 'as' => 'voyager.logout']);

```

### 7.移除storage/app/public/users資料夾

[](#7移除storageapppublicusers資料夾)

### 8.輸入指令以下指令以複製Ezlaravel套件的publish檔案

[](#8輸入指令以下指令以複製ezlaravel套件的publish檔案)

```
php artisan vendor:publish
```

### 9.建立資料庫表格與資料，執行以下指令並匯入SQL檔：easyweb.sql

[](#9建立資料庫表格與資料執行以下指令並匯入sql檔easywebsql)

```
 php artisan migrate:refresh
```

### 10.修改config/voyager.php設定檔，如以下範例：

[](#10修改configvoyagerphp設定檔如以下範例)

```
'dashboard' => [
        //修改後台navbar下拉選單的選項
        'navbar_items' => [
            '個人資料' => [
                'route'      => 'voyager.profile',
                'classes'    => 'class-full-of-rum',
                'icon_class' => 'voyager-person',
            ],
            '返回前台' => [
                'route'        => '/',
                'icon_class'   => 'voyager-home',
                'target_blank' => true,
            ],
            '登出' => [
                'route'      => 'voyager.logout',
                'icon_class' => 'voyager-power',
            ],
        ],

        'widgets' => [
            'Javck\\Ezlaravel\\Widgets\\ContactsWidget',
            'Javck\\Ezlaravel\\Widgets\\UsersWidget',
        ],

    ],

'storage' => [
        'disk' => 'public',
    ],

'compass_in_production' => true,

```

### 11.(可選)移除public 路徑

[](#11可選移除public-路徑)

#### 1. 將root path的server.php檔案更名為index.php

[](#1-將root-path的serverphp檔案更名為indexphp)

#### 2. 將public資料夾的.htaccess檔案複製一份到root資料夾

[](#2-將public資料夾的htaccess檔案複製一份到root資料夾)

```
Options -MultiViews -Indexes

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_URI} !(\.css|\.js|\.png|\.jpg|\.gif|robots\.txt)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(css|js|images)/(.*)$ public/$1/$2 [L,NC]

```

### 12.修改.env的APP\_URL路徑，更正為應用的DNS，格式請參考以下

[](#12修改env的app_url路徑更正為應用的dns格式請參考以下)

```
APP_NAME=EasyWeb
APP_ENV=production
APP_KEY=
APP_DEBUG=false
APP_URL=

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=21
DB_DATABASE=goblinah_
DB_USERNAME=goblinah_coder
DB_PASSWORD=A79siqCf!,g0
DEBUG_IP=114.32.18.161

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=sg1-ss5.a2hosting.com
MAIL_PORT=25
MAIL_FROM_ADDRESS=
MAIL_FROM_NAME=
MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_ENCRYPTION=null

NOCAPTCHA_SITEKEY=
NOCAPTCHA_SECRET=

PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

ECPAY_MERCHANT_ID=2000132
ECPAY_HASH_KEY=5294y06JbISpM5x9
ECPAY_HASH_IV=v77hoKGq4kWxNNIS
ECPAY_INVOICE_HASH_KEY=
ECPAY_INVOICE_HASH_IV=

SMG_USERNAME=
SMG_PASSWORD=
SMG_APIKEY=

```

### 13.將Select2版本改為4.0.2版本以下(目前預設為4.0.3)

[](#13將select2版本改為402版本以下目前預設為403)

#### 1. 變更voyager套件根目錄的package.json，將select2版本指定為4.0.2

[](#1-變更voyager套件根目錄的packagejson將select2版本指定為402)

#### 2. 將Terminal目錄切換到voyager套件目錄，依序執行npm install 和 npm run production

[](#2-將terminal目錄切換到voyager套件目錄依序執行npm-install-和-npm-run-production)

#### 3. 將voyager/publishable/assets/js/app.js複製到public/vendor/tcg/voyager/assets/js/app.js

[](#3-將voyagerpublishableassetsjsappjs複製到publicvendortcgvoyagerassetsjsappjs)

### 14.修改DataType，把用戶的Model改為App\\User

[](#14修改datatype把用戶的model改為appuser)

### 15.將Canvas的HTML資料夾所有檔案複製到專案的public資料夾，記得移除index.html

[](#15將canvas的html資料夾所有檔案複製到專案的public資料夾記得移除indexhtml)

### 16.修改webpack.mix.js，內容如下

[](#16修改webpackmixjs內容如下)

```
const mix = require('laravel-mix');

/*
 |--------------------------------------------------------------------------
 | Mix Asset Management
 |--------------------------------------------------------------------------
 |
 | Mix provides a clean, fluent API for defining some Webpack build steps
 | for your Laravel application. By default, we are compiling the Sass
 | file for the application as well as bundling up all the JS files.
 |
 */

mix.js('resources/js/app.js', 'public/js')
    .sass('resources/sass/app.scss', 'public/css');

mix.styles([
    'public/css/bootstrap.css',
    'public/style.css',
    'public/css/swiper.css',
    'public/css/dark.css',
    'public/css/font-icons.css',
    'public/css/animate.css',
    'public/css/magnific-popup.css',
    'public/css/responsive.css',
], 'public/css/all.css');

mix.scripts([
    'public/js/jquery.js',
    'public/js/plugins.js',
    'public/js/functions.js',
], 'public/js/all.js');

mix.disableSuccessNotifications();

```

### 17.如果需要忘記密碼或註冊功能，在routes/web.php加入

[](#17如果需要忘記密碼或註冊功能在routeswebphp加入)

```
Auth::routes();

```

### 18.修改app/Http/Middleware/Authenicate.php，改成

[](#18修改apphttpmiddlewareauthenicatephp改成)

```
route(‘voyager.login');

```

### 19.設定Canvas Setting

[](#19設定canvas-setting)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0e302e0692d877cf6496b3759bfd4e9134deaaf3beed9274c4533cd9e4d3a478?d=identicon)[javck](/maintainers/javck)

---

Top Contributors

[![javck](https://avatars.githubusercontent.com/u/1000675?v=4)](https://github.com/javck "javck (84 commits)")

### Embed Badge

![Health badge](/badges/javck-easyweb2/health.svg)

```
[![Health](https://phpackages.com/badges/javck-easyweb2/health.svg)](https://phpackages.com/packages/javck-easyweb2)
```

###  Alternatives

[precore/precore

Common classes and utilities

1427.8k](/packages/precore-precore)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
