改进 推介权限判断

This commit is contained in:
iVampireSP.com 2023-02-28 20:34:52 +08:00
parent 8453014ac7
commit 782d826bbd
No known key found for this signature in database
GPG Key ID: 2F7B001CA27A8132

View File

@ -83,7 +83,7 @@ function () {
/* End 实名认证 */ /* End 实名认证 */
/* Start 推介 */ /* Start 推介 */
Route::resource('affiliates', AffiliateController::class)->only(['index', 'create', 'store', 'destroy']); Route::middleware('resource_owner:affiliates')->resource('affiliates', AffiliateController::class)->only(['index', 'create', 'store', 'destroy']);
Route::middleware('guest')->withoutMiddleware(['verified', 'auth:web'])->get('affiliates/{affiliate:uuid}', [AffiliateController::class, 'show'])->name('affiliates.show'); Route::middleware('guest')->withoutMiddleware(['verified', 'auth:web'])->get('affiliates/{affiliate:uuid}', [AffiliateController::class, 'show'])->name('affiliates.show');
/* End 推介 */ /* End 推介 */