From 05a012b4674406492f24984bc3eab34b0371cdef Mon Sep 17 00:00:00 2001 From: MarcyLina Date: Fri, 8 Nov 2024 21:30:25 +0000 Subject: [PATCH 1/2] Dusting --- app/Http/Controllers/ResourceController.php | 21 ++++--- routes/web.php | 66 ++++++++++----------- 2 files changed, 43 insertions(+), 44 deletions(-) diff --git a/app/Http/Controllers/ResourceController.php b/app/Http/Controllers/ResourceController.php index 03a19afb..6da594f8 100644 --- a/app/Http/Controllers/ResourceController.php +++ b/app/Http/Controllers/ResourceController.php @@ -4,20 +4,19 @@ use App\Models\Resource; use Carbon\Carbon; -use Illuminate\Http\Request; use Illuminate\View\View; class ResourceController extends Controller { - public function index(): View - { - $resources = Resource::where('created_at', '>=', Carbon::now()->subDays(30)) - ->with('modules') // Eager load the module relationship - ->get(); + public function index(): View + { + $resources = Resource::where('created_at', '>=', Carbon::now()->subDays(30)) + ->with('modules') // Eager load the module relationship + ->get(); - return view('new-resources', [ - 'pageTitle' => __('New Resources'), - 'resources' => $resources, - ]); - } + return view('new-resources', [ + 'pageTitle' => __('New Resources'), + 'resources' => $resources, + ]); + } } diff --git a/routes/web.php b/routes/web.php index 30171608..6aeb0cc5 100644 --- a/routes/web.php +++ b/routes/web.php @@ -17,37 +17,37 @@ Route::get('/', RootRedirectController::class); Route::prefix('{locale}')->group(function () { - Route::view('/', 'welcome')->name('welcome'); - - Route::view('use-of-data', 'use-of-data')->name('use-of-data'); - Route::get('glossary', [GlossaryController::class, 'index'])->name('glossary'); - Route::get('tracks', [TrackController::class, 'index'])->name('tracks'); - - Route::prefix('modules')->name('modules.')->group(function () { - Route::get('/', [ModuleController::class, 'index'])->name('index'); - Route::get('{module}/{resourceType}', [ModuleController::class, 'show']) - ->name('show') - ->where('resourceType', 'free-resources|paid-resources|quizzes|exercises'); - }); - - Route::middleware('auth')->group(function () { - Route::get('wizard', [WizardController::class, 'index'])->name('wizard.index'); - Route::post('wizard', [WizardController::class, 'store'])->name('wizard.store'); - Route::get('profile', [ProfileController::class, 'show'])->name('user.profile.show'); - Route::put('profile', [ProfileController::class, 'update'])->name('user.profile.update'); - Route::get('preferences', [PreferenceController::class, 'index'])->name('user.preferences.index'); - Route::post('completions', [CompletionsController::class, 'store'])->name('user.completions.store'); - Route::delete('completions', [CompletionsController::class, 'destroy'])->name('user.completions.destroy'); - Route::patch('preferences', [PreferenceController::class, 'update'])->name('user.preferences.update'); - Route::get('new-resources', [ResourceController::class, 'index'])->name('user.new-resources'); - }); - - Route::get('unsubscribe/{token}', [SubscriptionController::class, 'destroy'])->name('unsubscribe'); - - Auth::routes(['register' => false]); - - Route::prefix('login')->group(function () { - Route::get('github', [LoginController::class, 'redirectToProvider'])->name('login.github'); - Route::get('github/callback', [LoginController::class, 'handleProviderCallback']); - }); + Route::view('/', 'welcome')->name('welcome'); + + Route::view('use-of-data', 'use-of-data')->name('use-of-data'); + Route::get('glossary', [GlossaryController::class, 'index'])->name('glossary'); + Route::get('tracks', [TrackController::class, 'index'])->name('tracks'); + + Route::prefix('modules')->name('modules.')->group(function () { + Route::get('/', [ModuleController::class, 'index'])->name('index'); + Route::get('{module}/{resourceType}', [ModuleController::class, 'show']) + ->name('show') + ->where('resourceType', 'free-resources|paid-resources|quizzes|exercises'); + }); + + Route::middleware('auth')->group(function () { + Route::get('wizard', [WizardController::class, 'index'])->name('wizard.index'); + Route::post('wizard', [WizardController::class, 'store'])->name('wizard.store'); + Route::get('profile', [ProfileController::class, 'show'])->name('user.profile.show'); + Route::put('profile', [ProfileController::class, 'update'])->name('user.profile.update'); + Route::get('preferences', [PreferenceController::class, 'index'])->name('user.preferences.index'); + Route::post('completions', [CompletionsController::class, 'store'])->name('user.completions.store'); + Route::delete('completions', [CompletionsController::class, 'destroy'])->name('user.completions.destroy'); + Route::patch('preferences', [PreferenceController::class, 'update'])->name('user.preferences.update'); + Route::get('new-resources', [ResourceController::class, 'index'])->name('user.new-resources'); + }); + + Route::get('unsubscribe/{token}', [SubscriptionController::class, 'destroy'])->name('unsubscribe'); + + Auth::routes(['register' => false]); + + Route::prefix('login')->group(function () { + Route::get('github', [LoginController::class, 'redirectToProvider'])->name('login.github'); + Route::get('github/callback', [LoginController::class, 'handleProviderCallback']); + }); }); From cd795dc681873374a82ee90fead4ce8534f44366 Mon Sep 17 00:00:00 2001 From: MarcyLina Date: Fri, 8 Nov 2024 21:30:26 +0000 Subject: [PATCH 2/2] Ignore Dusting commit in git blame --- .git-blame-ignore-revs | 1 + 1 file changed, 1 insertion(+) diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index 877cd985..37d51c5b 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -10,3 +10,4 @@ f726790a2e2c09018532c8e7397359d443b63e70 0fae228289851aea2d79b09b546dcf5f7f852446 bf119c7c9689569a03c527696008eadd5ad5a29c 9a00c3e9425e213ceca32b57b14dad1f785f99ae +05a012b4674406492f24984bc3eab34b0371cdef