1. 增加Email帳號驗證功能 Sentinel 2.0
安裝參考:SENTINEL BY CARTALYST
作者建議安裝這個套件前,最好將預設的資料表刪乾淨,所以千萬不要拿正式站的來玩!
清空資料庫:
如果怕玩掛的話,就先把migrations內的檔案都搬走做個備份。
開啟 config/applphp
下載設定檔及資料表文件
這樣就安裝完成了,其實還蠻簡單的~
Sentinel 的設定檔存在 config/cartalyst.sentinel.php 內,有需要的話可以自行更改,譬如cookie and session 的名稱。
作者建議安裝這個套件前,最好將預設的資料表刪乾淨,所以千萬不要拿正式站的來玩!
清空資料庫:
$php artisan migrate:reset
$composer require cartalyst/sentinel "2.0.*"
如果怕玩掛的話,就先把migrations內的檔案都搬走做個備份。
開啟 config/applphp
'providers' => [ /* * Application Service Providers... */ App\Providers\AppServiceProvider::class, App\Providers\EventServiceProvider::class, App\Providers\RouteServiceProvider::class,Cartalyst\Sentinel\Laravel\SentinelServiceProvider::class,], 'aliases' => [ /* * Application Service Providers... */'Activation' => Cartalyst\Sentinel\Laravel\Facades\Activation::class, 'Reminder' => Cartalyst\Sentinel\Laravel\Facades\Reminder::class, 'Sentinel' => Cartalyst\Sentinel\Laravel\Facades\Sentinel::class,],
下載設定檔及資料表文件
$php artisan vendor:publish --provider="Cartalyst\Sentinel\Laravel\SentinelServiceProvider"Copied File [/vendor/cartalyst/sentinel/src/config/config.php] To [/config/cartalyst.sentinel.php] Copied Directory [/vendor/cartalyst/sentinel/src/migrations] To [/database/migrations] Publishing complete for tag []!
$php artisan migrateMigration table created successfully. Migrated: 2014_07_02_230147_migration_cartalyst_sentinel
這樣就安裝完成了,其實還蠻簡單的~
Sentinel 的設定檔存在 config/cartalyst.sentinel.php 內,有需要的話可以自行更改,譬如cookie and session 的名稱。
留言
張貼留言