Skip to content

Commit

Permalink
Cache
Browse files Browse the repository at this point in the history
Route Service Provider
Login controller
  • Loading branch information
alainvd committed Apr 26, 2024
1 parent f6de60f commit b0ede1a
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 24 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct()
/**
* Redirect the user to the GitHub authentication page.
*/
public function redirectToProvider($provider): Response
public function redirectToProvider($provider): RedirectResponse
{

return Socialite::driver($provider)->redirect();
Expand Down
1 change: 1 addition & 0 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

class RouteServiceProvider extends ServiceProvider
{

/**
* Define your route model bindings, pattern filters, etc.
*/
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"maatwebsite/excel": "^3.1",
"martinlindhe/laravel-vue-i18n-generator": "dev-l10",
"mediconesystems/livewire-datatables": "^0.10",
"predis/predis": "^1.1",
"predis/predis": "^2.2",
"rappasoft/laravel-livewire-tables": "^2.11",
"socialiteproviders/microsoft-azure": "^4.2",
"spatie/laravel-activitylog": "^4.7",
Expand Down
31 changes: 13 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions config/hashing.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@
*/

'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 12),
'verify' => true,
'rounds' => env('BCRYPT_ROUNDS', 12)
],

/*
Expand Down
35 changes: 35 additions & 0 deletions database/migrations/2024_04_25_151908_create_cache_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});

Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};
5 changes: 3 additions & 2 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use App\Http\Controllers\AdminController;
use App\Http\Controllers\Api;
// use App\Http\Controllers\Auth;
use App\Http\Controllers\Auth\LoginController;
use App\Http\Controllers\BadgesController;
use App\Http\Controllers\CertificateController;
use App\Http\Controllers\Codeweek4AllController;
Expand Down Expand Up @@ -298,10 +299,10 @@
->name('volunteer_store');
Route::post('/events', [EventController::class, 'store'])->middleware('auth');
Route::patch('/events/{event}', [EventController::class, 'update'])->middleware('auth');
Route::get('login/{provider}', [Auth\LoginController::class, 'redirectToProvider']);
Route::get('login/{provider}', [LoginController::class, 'redirectToProvider']);
Route::get(
'login/{provider}/callback',
[Auth\LoginController::class, 'handleProviderCallback']
[LoginController::class, 'handleProviderCallback']
);
Route::get('/my', [EventController::class, 'my'])
->middleware('auth')
Expand Down

0 comments on commit b0ede1a

Please sign in to comment.