From 21793213a8cc865a789a260f4f8331668c93ef2b Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Mon, 17 Sep 2018 11:06:35 -0300 Subject: [PATCH] Including email verification --- app/User.php | 2 +- config/app.php | 2 +- routes/web.php | 32 ++++++++++++++++---------------- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/User.php b/app/User.php index 36c7b6a..55e77d6 100644 --- a/app/User.php +++ b/app/User.php @@ -6,7 +6,7 @@ use Illuminate\Notifications\Notifiable; use Illuminate\Contracts\Auth\MustVerifyEmail; use Illuminate\Foundation\Auth\User as Authenticatable; -class User extends Authenticatable +class User extends Authenticatable implements MustVerifyEmail { use Notifiable; diff --git a/config/app.php b/config/app.php index 9bb560f..a0bea79 100644 --- a/config/app.php +++ b/config/app.php @@ -65,7 +65,7 @@ return [ | */ - 'timezone' => 'UTC', + 'timezone' => 'America/Sao_Paulo', /* |-------------------------------------------------------------------------- diff --git a/routes/web.php b/routes/web.php index d44ab98..9bf8a9b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -16,26 +16,26 @@ Route::get('/', function () { }); Route::get('/product', 'ProductController@index')->middleware('auth'); -Route::get('/product/{product}', 'ProductController@show')->middleware('auth'); -Route::post('/product', 'ProductController@store')->middleware('auth'); -Route::patch('/product', 'ProductController@patch')->middleware('auth'); -Route::delete('/product', 'ProductController@delete')->middleware('auth'); +Route::get('/product/{product}', 'ProductController@show')->middleware('verified'); +Route::post('/product', 'ProductController@store')->middleware('verified'); +Route::patch('/product', 'ProductController@patch')->middleware('verified'); +Route::delete('/product', 'ProductController@delete')->middleware('verified'); -Route::get('/item', 'ItemController@index')->middleware('auth'); -Route::get('/item/{item}', 'ItemController@show')->middleware('auth'); -Route::post('/item', 'ItemController@store')->middleware('auth'); -Route::patch('/item', 'ItemController@patch')->middleware('auth'); -Route::delete('/item', 'ItemController@delete')->middleware('auth'); +Route::get('/item', 'ItemController@index')->middleware('verified'); +Route::get('/item/{item}', 'ItemController@show')->middleware('verified'); +Route::post('/item', 'ItemController@store')->middleware('verified'); +Route::patch('/item', 'ItemController@patch')->middleware('verified'); +Route::delete('/item', 'ItemController@delete')->middleware('verified'); -Route::post('/take', 'TakeController@store')->middleware('auth'); -Route::delete('/take', 'TakeController@delete')->middleware('auth'); +Route::post('/take', 'TakeController@store')->middleware('verified'); +Route::delete('/take', 'TakeController@delete')->middleware('verified'); -Route::post('/alert', 'AlertController@store')->middleware('auth'); -Route::delete('/alert', 'AlertController@delete')->middleware('auth'); +Route::post('/alert', 'AlertController@store')->middleware('verified'); +Route::delete('/alert', 'AlertController@delete')->middleware('verified'); -Route::post('/user', 'UserController@store')->middleware('auth'); -Route::delete('/user', 'UserController@delete')->middleware('auth'); +Route::post('/user', 'UserController@store')->middleware('verified'); +Route::delete('/user', 'UserController@delete')->middleware('verified'); -Auth::routes(); +Auth::routes(['verify' => true]); Route::get('/home', 'HomeController@index')->name('home')->middleware('auth');