中文化這邊有:https://laravel-china.org/topics/4720/i-also-translated-laravels-background-extension-voyager
1.首先安裝laravel 5.5
composer create-project laravel/laravel 5.5 composer update
2.安裝voyager
composer require tcg/voyager
3.設定env
APP_URL=http://localhost:8000 DB_DATABASE=xxxx DB_USERNAME=xxxx DB_PASSWORD=xxxx
4.執行voyager install migrate
php artisan voyager:install
PS:如果出現錯誤可以到config/databases 調整mysql
'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', '127.0.0.1'), 'port' => env('DB_PORT', '3306'), 'database' => env('DB_DATABASE', 'forge'), 'username' => env('DB_USERNAME', 'forge'), 'password' => env('DB_PASSWORD', ''), 'unix_socket' => env('DB_SOCKET', ''), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => true, 'engine' => null, ],
3.創建admin
php artisan voyager:admin your@email.com --create
5.網址打入 localhost:8000/admin 使用剛剛輸入的密碼登入
6.設定可以使用google analytics功能
說明:https://www.youtube.com/watch?v=Qw5HQiZIehg
在setting頁面->admin->
Google Analytics Client ID (used for admin dashboard) setting('admin.google_analytics_client_id')
填入https://console.developers.google.com/apis/dashboard設定的 oauth 憑證的client_id。
設定完畢即可以在disable登入gmail帳號,並看到相關數據資料。
沒有留言:
張貼留言