Skip to content

Instantly share code, notes, and snippets.

@ercanertan
Last active October 12, 2018 13:32
Show Gist options
  • Save ercanertan/0c7a8345391aabc8d220835e9229ca83 to your computer and use it in GitHub Desktop.
Save ercanertan/0c7a8345391aabc8d220835e9229ca83 to your computer and use it in GitHub Desktop.
Laravel Module Setup
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