From 3b492e6e5a690d0b8509d590e912e61f4e2a80bc Mon Sep 17 00:00:00 2001 From: Karan Sanjeev Date: Sun, 22 Nov 2020 17:05:26 +0530 Subject: [PATCH 1/4] Replace project name to be dynamic --- resources/views/contact.blade.php | 4 +-- resources/views/dashboard/show.blade.php | 2 +- resources/views/layouts/app.blade.php | 8 +++--- resources/views/plans/redirect.blade.php | 2 +- resources/views/privacy.blade.php | 4 +-- resources/views/refund.blade.php | 6 ++--- resources/views/terms.blade.php | 34 ++++++++++++------------ resources/views/welcome.blade.php | 16 +++++------ 8 files changed, 38 insertions(+), 38 deletions(-) diff --git a/resources/views/contact.blade.php b/resources/views/contact.blade.php index e9fb858..c13d29f 100644 --- a/resources/views/contact.blade.php +++ b/resources/views/contact.blade.php @@ -13,7 +13,7 @@

Contact me

- I'm Karan Sanjeev, a Indie Maker. FormZend is + I'm Karan Sanjeev, a Indie Maker. {{ config('app.name') }} is made completely on my own time without any funding or investment. I respect privacy and believe it's a right.

@@ -23,7 +23,7 @@ contact forms, then here's one — just for you

-
+
diff --git a/resources/views/dashboard/show.blade.php b/resources/views/dashboard/show.blade.php index 43dcaa7..e46c3e4 100644 --- a/resources/views/dashboard/show.blade.php +++ b/resources/views/dashboard/show.blade.php @@ -75,7 +75,7 @@

- Click here to integrate FormZend + Click here to integrate {{ config('app.name') }} @endforelse
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index 600463d..b77fe4e 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -8,19 +8,19 @@ - + - + - + @yield('head') - @yield('title') - FormZend + @yield('title') - {{ config('app.name') }} diff --git a/resources/views/plans/redirect.blade.php b/resources/views/plans/redirect.blade.php index 61b88ee..3ae55a9 100644 --- a/resources/views/plans/redirect.blade.php +++ b/resources/views/plans/redirect.blade.php @@ -21,7 +21,7 @@ - + diff --git a/resources/views/privacy.blade.php b/resources/views/privacy.blade.php index 90c5d65..1cb73f9 100644 --- a/resources/views/privacy.blade.php +++ b/resources/views/privacy.blade.php @@ -13,9 +13,9 @@

Privacy Policy

- Your privacy is important to us. It is FormZend's policy to respect your privacy regarding + Your privacy is important to us. It is {{ config('app.name') }}'s policy to respect your privacy regarding any information we may collect from you across our website, - https://formzend.com, and other sites we own and operate. + {{ config('app.url') }}, and other sites we own and operate.

diff --git a/resources/views/refund.blade.php b/resources/views/refund.blade.php index 82bae5d..8d59bf6 100644 --- a/resources/views/refund.blade.php +++ b/resources/views/refund.blade.php @@ -10,10 +10,10 @@

-

FormZend Refund & Cancellation Policy

+

{{ config('app.name') }} Refund & Cancellation Policy

- Since FormZend sells digital service, we cannot either refund nor cancel your purchase. But if - in case you are not happy with your purchase and did not like what FormZend delivers, you can + Since {{ config('app.name') }} sells digital service, we cannot either refund nor cancel your purchase. But if + in case you are not happy with your purchase and did not like what {{ config('app.name') }} delivers, you can contact me directly at formzend@alphaman.me and a refund will be processed if the reason is agree-able.
diff --git a/resources/views/terms.blade.php b/resources/views/terms.blade.php index 3519d85..d9ba259 100644 --- a/resources/views/terms.blade.php +++ b/resources/views/terms.blade.php @@ -10,12 +10,12 @@
-

FormZend Terms of Service

+

{{ config('app.name') }} Terms of Service

1. Terms

- By accessing the website at https://formzend.com, + By accessing the website at {{ config('app.url') }}, you are agreeing to be bound by these terms of service, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, you are prohibited from using or accessing this site. @@ -27,7 +27,7 @@

  1. Permission is granted to temporarily download one copy of the materials - (information or software) on FormZend's website for personal, non-commercial transitory + (information or software) on {{ config('app.name') }}'s website for personal, non-commercial transitory viewing only. This is the grant of a license, not a transfer of title, and under this license you may not: @@ -39,7 +39,7 @@
  2. attempt to decompile or reverse engineer any software contained on - FormZend's website; + {{ config('app.name') }}'s website;
  3. remove any copyright or other proprietary notations from the materials; or
  4. @@ -50,7 +50,7 @@
  5. This license shall automatically terminate if you violate any of these restrictions and - may be terminated by FormZend at any time. Upon terminating your viewing of these + may be terminated by {{ config('app.name') }} at any time. Upon terminating your viewing of these materials or upon the termination of this license, you must destroy any downloaded materials in your possession whether in electronic or printed format.
  6. @@ -60,14 +60,14 @@
    1. - The materials on FormZend's website are provided on an 'as is' basis. FormZend makes no + The materials on {{ config('app.name') }}'s website are provided on an 'as is' basis. {{ config('app.name') }} makes no warranties, expressed or implied, and hereby disclaims and negates all other warranties including, without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights.
    2. - Further, FormZend does not warrant or make any representations concerning the accuracy, + Further, {{ config('app.name') }} does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its website or otherwise relating to such materials or on any sites linked to this site.
    3. @@ -76,10 +76,10 @@

      4. Limitations

      - In no event shall FormZend or its suppliers be liable for any damages (including, without + In no event shall {{ config('app.name') }} or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption) arising - out of the use or inability to use the materials on FormZend's website, even if FormZend - or a FormZend authorized representative has been notified orally or in writing of the + out of the use or inability to use the materials on {{ config('app.name') }}'s website, even if {{ config('app.name') }} + or a {{ config('app.name') }} authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you. @@ -88,25 +88,25 @@

      5. Accuracy of materials

      - The materials appearing on FormZend's website could include technical, typographical, or - photographic errors. FormZend does not warrant that any of the materials on its website are - accurate, complete or current. FormZend may make changes to the materials contained on its - website at any time without notice. However FormZend does not make any commitment to update + The materials appearing on {{ config('app.name') }}'s website could include technical, typographical, or + photographic errors. {{ config('app.name') }} does not warrant that any of the materials on its website are + accurate, complete or current. {{ config('app.name') }} may make changes to the materials contained on its + website at any time without notice. However {{ config('app.name') }} does not make any commitment to update the materials.

      6. Links

      - FormZend has not reviewed all of the sites linked to its website and is not responsible for + {{ config('app.name') }} has not reviewed all of the sites linked to its website and is not responsible for the contents of any such linked site. The inclusion of any link does not imply endorsement - by FormZend of the site. Use of any such linked website is at the user's own risk. + by {{ config('app.name') }} of the site. Use of any such linked website is at the user's own risk.

      7. Modifications

      - FormZend may revise these terms of service for its website at any time without notice. + {{ config('app.name') }} may revise these terms of service for its website at any time without notice. By using this website you are agreeing to be bound by the then current version of these terms of service.

      diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index dd10b99..efb23c6 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -15,7 +15,7 @@
      -
      <form action="{{ config('app.url') }}/your@email.com" method="POST">
      +                            
      <form action="{{ route('form', ['your@email.com']) }}" method="POST">
         <input type="email" name="email">
         <input type="text" name="name">
         <input type="submit" name="Send!">
      @@ -37,7 +37,7 @@
                               

      Change your form's action attribute to this and replace your@email.com with your own email.

      - +
      @@ -82,7 +82,7 @@ FormData - and FormZend will handle everything else. + and {{ config('app.name') }} will handle everything else.

      @@ -128,7 +128,7 @@
      - Is FormZend free? + Is {{ config('app.name') }} free?
      @@ -175,13 +175,13 @@

      - About FormZend + About {{ config('app.name') }}

      - I'm Karan Sanjeev, a Indie Maker. FormZend is + I'm Karan Sanjeev, a Indie Maker. {{ config('app.name') }} is made completely on my own time without any funding or investment. I respect privacy and believe it's a right.

      - If you aren’t paying for a product, you are the product. I charge a small fee for FormZend, + If you aren’t paying for a product, you are the product. I charge a small fee for {{ config('app.name') }}, because I sell service, not data.

      @@ -200,7 +200,7 @@
      - +
      From 21edbfd43f5f7f924644d7c683b18f09aadcdea6 Mon Sep 17 00:00:00 2001 From: Karan Sanjeev Date: Mon, 23 Nov 2020 13:13:30 +0530 Subject: [PATCH 2/4] Get URI instead of just the Host name --- app/Http/Controllers/FormController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/FormController.php b/app/Http/Controllers/FormController.php index 31171fe..3f4f332 100644 --- a/app/Http/Controllers/FormController.php +++ b/app/Http/Controllers/FormController.php @@ -17,7 +17,7 @@ public function __construct() public function handleSubmission($email) { - $url = request()->header('origin'); + $url = request()->getUri(); $account = Account::firstWhere('email', $email); $website = $account->websites->firstWhere('url', $url); From ceb5131ebabc2457fcaa46b48884946dffddc460 Mon Sep 17 00:00:00 2001 From: Karan Sanjeev Date: Tue, 24 Nov 2020 13:42:29 +0530 Subject: [PATCH 3/4] Change wordings on homepage --- resources/views/welcome.blade.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/views/welcome.blade.php b/resources/views/welcome.blade.php index efb23c6..3e4eac1 100644 --- a/resources/views/welcome.blade.php +++ b/resources/views/welcome.blade.php @@ -105,8 +105,9 @@
      - Your data, stays yours. I never alter or sell your data and it's against my ethics. - We use Mailgun to send you email, so their privacy policy also applies. + Absolutely. Your data belongs to you. If you aren’t paying for a product, + you are the product. I charge a small fee for + {{ config('app.name') }}, because I sell service, not data.
      From ed129bd9cf42a150b6c3d05461a9e77cf6d943f3 Mon Sep 17 00:00:00 2001 From: Karan Sanjeev Date: Tue, 24 Nov 2020 20:36:24 +0530 Subject: [PATCH 4/4] Use full host url than just host domain --- app/Http/Controllers/FormController.php | 2 +- app/Http/Middleware/CheckIfEmail.php | 2 +- app/Http/Middleware/CheckIfVerified.php | 2 +- routes/web.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/FormController.php b/app/Http/Controllers/FormController.php index 3f4f332..2c08ee5 100644 --- a/app/Http/Controllers/FormController.php +++ b/app/Http/Controllers/FormController.php @@ -17,7 +17,7 @@ public function __construct() public function handleSubmission($email) { - $url = request()->getUri(); + $url = request()->headers->get('referer'); $account = Account::firstWhere('email', $email); $website = $account->websites->firstWhere('url', $url); diff --git a/app/Http/Middleware/CheckIfEmail.php b/app/Http/Middleware/CheckIfEmail.php index 35876c5..11b99cf 100644 --- a/app/Http/Middleware/CheckIfEmail.php +++ b/app/Http/Middleware/CheckIfEmail.php @@ -16,7 +16,7 @@ class CheckIfEmail */ public function handle($request, Closure $next) { - $host = $request->header('origin'); + $host = $request->header('referer'); $validator = Validator::make(['email' => $request->route('email')], [ 'email' => 'required|email' ]); diff --git a/app/Http/Middleware/CheckIfVerified.php b/app/Http/Middleware/CheckIfVerified.php index 94f9cd0..efa8199 100644 --- a/app/Http/Middleware/CheckIfVerified.php +++ b/app/Http/Middleware/CheckIfVerified.php @@ -18,7 +18,7 @@ class CheckIfVerified */ public function handle($request, Closure $next) { - $host = $request->header('origin'); + $host = $request->header('referer'); $email = $request->route('email'); $account = Account::firstOrCreate(['email' => $email]); diff --git a/routes/web.php b/routes/web.php index de3b0be..c466c2c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -26,7 +26,7 @@ ->middleware('auth') ->name('logout'); Route::get('auth/login/account/{account:id}', 'AuthController@loginUser') - ->middleware('signed', 'guest') + ->middleware('guest', 'signed') ->name('login.verify'); Route::get('verify/website/{website:id}', 'WebsiteController@verify')