Last active
October 12, 2018 13:32
-
-
Save ercanertan/0c7a8345391aabc8d220835e9229ca83 to your computer and use it in GitHub Desktop.
Laravel Module Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. config/auth.php | |
'users' => [ | |
'driver' => 'eloquent', | |
'model' => Modules\User\Entities\User::class, | |
], | |
2.Create config file for env variables | |
return [ | |
'recaptcha' => [ | |
'key' => env('GOOGLE_RECAPTCHA_KEY'), | |
'secret' => env('GOOGLE_RECAPTCHA_SECRET'), | |
], | |
]; | |
3. RedirectIfAuthenticated | |
handle | |
if (Auth::guard($guard)->check()) { | |
return redirect('/admin'); | |
} | |
4. AppServiceProvider | |
use Illuminate\Support\Facades\Schema; | |
public function boot() | |
{ | |
Schema::defaultStringLength(191); | |
} | |
5. Kernel.php | |
protected $routeMiddleware = [ | |
... | |
'check.status' => \Modules\User\Http\Middleware\CheckStatus::class, | |
... | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment