Skip to content

Commit

Permalink
Update email verification link
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Dec 27, 2023
1 parent 5bd2c68 commit f1298ef
Show file tree
Hide file tree
Showing 17 changed files with 128 additions and 119 deletions.
10 changes: 1 addition & 9 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,14 @@ GITHUB_CLIENT_ID=
GITHUB_CLIENT_SECRET=
GITHUB_REDIRECT=${APP_URL}/auth/github/callback

TWITTER_CLIENT_ID=
TWITTER_CLIENT_SECRET=
TWITTER_REDIRECT=${APP_URL}/auth/twitter/callback
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_SECRET=

SLACK_WEBHOOK_URL=
SLACK_TEAM_NAME="Laravel Cameroun"
SLACK_API_TOKEN=
SLACK_TEAM_URL="https://laravelcm.slack.com"

MARKDOWNX_GIPHY_API_KEY=
TORCHLIGHT_TOKEN=
MIX_TORCHLIGHT_TOKEN="${TORCHLIGHT_TOKEN}"
TORCHLIGHT_THEME=moonlight-ii
UNSPLASH_ACCESS_KEY=

TELEGRAM_BOT_TOKEN=
Expand Down
4 changes: 2 additions & 2 deletions app/Events/CommentWasAdded.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
use App\Models\Reply;
use Illuminate\Queue\SerializesModels;

final class CommentWasAdded
final readonly class CommentWasAdded
{
use SerializesModels;

public function __construct(public readonly Reply $reply, public readonly Discussion $discussion)
public function __construct(public Reply $reply, public Discussion $discussion)
{
}
}
4 changes: 2 additions & 2 deletions app/Exceptions/CannotCreateUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ final class CannotCreateUser extends Exception
{
public static function duplicateEmailAddress(string $emailAddress): self
{
return new static("Cet adresse e-mail [{$emailAddress}] existe déjà.");
return new CannotCreateUser("Cet adresse e-mail [{$emailAddress}] existe déjà.");
}

public static function duplicateUsername(string $username): self
{
return new static("Ce pseudo [{$username}] existe déjà.");
return new CannotCreateUser("Ce pseudo [{$username}] existe déjà.");
}
}
4 changes: 2 additions & 2 deletions app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
use Illuminate\Support\Facades\Auth;
use Laravel\Sanctum\HasApiTokens;
use Laravel\Socialite\Contracts\User as SocialUser;
use Laravelcm\Subscriptions\Traits\HasPlanSubscriptions;
use LaravelFeature\Featurable\Featurable;
use LaravelFeature\Featurable\FeaturableInterface;
use QCod\Gamify\Gamify;
// use Rinvex\Subscriptions\Traits\HasPlanSubscriptions;
use Spatie\MediaLibrary\HasMedia;
use Spatie\MediaLibrary\InteractsWithMedia;
use Spatie\Permission\Traits\HasRoles;
Expand All @@ -41,7 +41,7 @@ final class User extends Authenticatable implements MustVerifyEmail, HasMedia, F
use Gamify;
use HasApiTokens;
use HasFactory;
// use HasPlanSubscriptions;
use HasPlanSubscriptions;
use HasProfilePhoto;
use HasRoles;
use HasSettings;
Expand Down
8 changes: 4 additions & 4 deletions app/Providers/EventServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ final class EventServiceProvider extends ServiceProvider
\SocialiteProviders\Twitter\TwitterExtendSocialite::class.'@handle',
],

ApiRegistered::class => [
SendCompanyEmailVerificationNotification::class,
SendWelcomeCompanyNotification::class,
],
// ApiRegistered::class => [
// SendCompanyEmailVerificationNotification::class,
// SendWelcomeCompanyNotification::class,
// ],

SponsoringPaymentInitialize::class => [
SendPaymentNotification::class,
Expand Down
14 changes: 11 additions & 3 deletions app/Providers/FortifyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,24 @@ public function boot(): void
Fortify::loginView(fn () => view('auth.login'));
Fortify::registerView(fn () => view('auth.register'));
Fortify::requestPasswordResetLinkView(fn () => view('auth.forgot-password'));
Fortify::resetPasswordView(fn ($request) => view('auth.reset-password', ['request' => $request]));
Fortify::resetPasswordView(fn (Request $request) => view('auth.reset-password', ['request' => $request]));
Fortify::verifyEmailView(fn () => view('auth.verify-email'));

Fortify::createUsersUsing(CreateNewUser::class);
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);

RateLimiter::for('login', fn (Request $request) => Limit::perMinute(5)->by($request->email.$request->ip()));
RateLimiter::for(
'login',
fn (Request $request) => Limit::perMinute(5)
->by($request->email.$request->ip())
);

RateLimiter::for('two-factor', fn (Request $request) => Limit::perMinute(5)->by($request->session()->get('login.id')));
RateLimiter::for(
'two-factor',
fn (Request $request) => Limit::perMinute(5)
->by($request->session()->get('login.id'))
);
}
}
8 changes: 4 additions & 4 deletions app/Providers/RouteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ public function boot(): void
$this->routeBindings();

$this->routes(function (): void {
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
// Route::prefix('api')
// ->middleware('api')
// ->namespace($this->namespace)
// ->group(base_path('routes/api.php'));

Route::middleware('web')
->namespace($this->namespace)
Expand Down
2 changes: 1 addition & 1 deletion pint.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
"trim_array_spaces": true,
"use_arrow_functions": true,
"void_return": true,
"yoda_style": true
"yoda_style": false
}
}
3 changes: 0 additions & 3 deletions resources/views/components/header.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
<a href="{{ route('discussions.index') }}" class="inline-flex items-center px-1 text-sm font-medium {{ active(['discussions', 'discussions*'], 'text-skin-primary hover:text-skin-primary-hover', 'text-skin-menu hover:text-skin-menu-hover') }}">
{{ __('Discussions') }}
</a>
<a href="#" class="inline-flex items-center px-1 text-sm font-medium {{ active(['tutorials', 'tutorials*'], 'text-skin-primary hover:text-skin-primary-hover', 'text-skin-menu hover:text-skin-menu-hover') }}">
{{ __('Vidéos') }}
</a>
<div class="relative px-1 mt-1.5">
<button @click="flyoutMenu =! flyoutMenu" type="button" class="group rounded-md inline-flex items-center font-medium text-skin-menu hover:text-skin-menu-hover focus:outline-none focus:ring-0" :class="{ 'text-skin-menu-hover': flyoutMenu, 'text-skin-menu': !(flyoutMenu) }">
<x-untitledui-dots-horizontal class="h-5 w-5" />
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/icon/twitter.blade.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<svg {{ $attributes }} fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path d="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84"></path>
<svg {{ $attributes }} viewBox="0 0 1200 1227" fill="currentColor" aria-hidden="true">
<path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z" />
</svg>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Bonjour **{{ $user->name }}**,

Vous recevez ce mail parce que vous avez créé votre compte sur Laravel Cameroun {{ $user->created_at->diffForHumans() }},
et a ce jour vous n'avez pas encore vérifié votre adresse mail.
et à ce jour, vous n'avez pas encore vérifié votre adresse mail.

Pour éviter toute suppression de votre compte il vous reste {{ $user->created_at->addDays(10)->diffInDays(now()) }} jour(s) pour valider votre adresse email.

Expand Down
2 changes: 1 addition & 1 deletion resources/views/emails/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

@component('mail::subcopy')
[Créer un thread :]({{ route('forum.new') }})
vous rencontrez des soucis dans votre code ou votre projet 🤔 ? Partagez le avec nous et laissez nous vous aider.
vous rencontrez des soucis dans votre code ou votre projet 🤔 ? Partagez-le avec nous et laissez-nous vous aider.
@endcomponent

@component('mail::subcopy')
Expand Down
5 changes: 4 additions & 1 deletion resources/views/home.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@
</div>
</div>
<div class="mt-6 text-center lg:mt-10">
<a class="text-sm leading-5 text-flag-green hover:text-green-600 hover:underline" href="{{ route('sponsors') }}">
<a
class="text-sm leading-5 text-flag-green hover:text-green-600 hover:underline"
target="_blank"
href="https://github.com/sponsors/laravelcm">
{{ __('Votre logo ici ?') }}
</a>
</div>
Expand Down
34 changes: 17 additions & 17 deletions resources/views/vendor/mail/html/card.blade.php
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<table class="card" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="card-content">
<table width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="card-image">
{{ $image ?? '' }}
</td>
<td class="card-description">
<a href="{{ $url }}" style="display: inline-block;">
<span style="position: absolute; top: 0; left: 0; right: 0; bottom: 0" aria-hidden="true"></span>
<p class="card-title">{{ $title }}</p>
</a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="card-content">
<table width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td class="card-image">
{{ $image ?? '' }}
</td>
<td class="card-description">
<a href="{{ $url }}" style="display: inline-block;">
<span style="position: absolute; top: 0; left: 0; right: 0; bottom: 0" aria-hidden="true"></span>
<p class="card-title">{{ $title }}</p>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>

Loading

0 comments on commit f1298ef

Please sign in to comment.