From e77662416ec031f626e588a4378377f8ef92b3d8 Mon Sep 17 00:00:00 2001 From: Juzaweb Date: Mon, 25 Dec 2023 23:31:01 +0700 Subject: [PATCH] :+1: Subscribe ajax --- changelog.md | 6 ++++++ src/NotificationAction.php | 2 +- src/Tests/Feature/SubscribeTest.php | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 changelog.md diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..4a7babc --- /dev/null +++ b/changelog.md @@ -0,0 +1,6 @@ +### vv1.0.2 +* :+1: Subscribe ajax +* :+1: Subscriber management +* :bug: Fix show via +* :+1: Update namespace + diff --git a/src/NotificationAction.php b/src/NotificationAction.php index 2f8b389..7cc7c1d 100644 --- a/src/NotificationAction.php +++ b/src/NotificationAction.php @@ -50,7 +50,7 @@ public function addAdminMenus(): void public function addFrontendAjaxs(): void { $this->registerFrontendAjax( - 'subscribes', + 'subscribe', [ 'method' => 'POST', 'callback' => [SubscribeController::class, 'store'], diff --git a/src/Tests/Feature/SubscribeTest.php b/src/Tests/Feature/SubscribeTest.php index e3b9372..e574063 100644 --- a/src/Tests/Feature/SubscribeTest.php +++ b/src/Tests/Feature/SubscribeTest.php @@ -24,9 +24,9 @@ public function testSubscribe(): void $faker = \Faker\Factory::create(); $response = $this->post( - 'ajax/subscribes', + 'ajax/subscribe', [ - 'email' => $faker->email, + 'email' => $faker->email(), ] );