Skip to content

Commit 171449e

Browse files
authored
Fix mail link (#138)
* Update and delete translations * Update email verification link * Update phpunit config file
1 parent d3df5c9 commit 171449e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+163
-4201
lines changed

Diff for: .env.example

+1-9
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,14 @@ GITHUB_CLIENT_ID=
5656
GITHUB_CLIENT_SECRET=
5757
GITHUB_REDIRECT=${APP_URL}/auth/github/callback
5858

59-
TWITTER_CLIENT_ID=
60-
TWITTER_CLIENT_SECRET=
61-
TWITTER_REDIRECT=${APP_URL}/auth/twitter/callback
62-
TWITTER_CONSUMER_KEY=
63-
TWITTER_CONSUMER_SECRET=
64-
TWITTER_ACCESS_TOKEN=
65-
TWITTER_ACCESS_SECRET=
66-
6759
SLACK_WEBHOOK_URL=
6860
SLACK_TEAM_NAME="Laravel Cameroun"
6961
SLACK_API_TOKEN=
7062
SLACK_TEAM_URL="https://laravelcm.slack.com"
7163

7264
MARKDOWNX_GIPHY_API_KEY=
7365
TORCHLIGHT_TOKEN=
74-
MIX_TORCHLIGHT_TOKEN="${TORCHLIGHT_TOKEN}"
66+
TORCHLIGHT_THEME=moonlight-ii
7567
UNSPLASH_ACCESS_KEY=
7668

7769
TELEGRAM_BOT_TOKEN=

Diff for: app/Events/CommentWasAdded.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
use App\Models\Reply;
99
use Illuminate\Queue\SerializesModels;
1010

11-
final class CommentWasAdded
11+
final readonly class CommentWasAdded
1212
{
1313
use SerializesModels;
1414

15-
public function __construct(public readonly Reply $reply, public readonly Discussion $discussion)
15+
public function __construct(public Reply $reply, public Discussion $discussion)
1616
{
1717
}
1818
}

Diff for: app/Exceptions/CannotCreateUser.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ final class CannotCreateUser extends Exception
1010
{
1111
public static function duplicateEmailAddress(string $emailAddress): self
1212
{
13-
return new static("Cet adresse e-mail [{$emailAddress}] existe déjà.");
13+
return new CannotCreateUser("Cet adresse e-mail [{$emailAddress}] existe déjà.");
1414
}
1515

1616
public static function duplicateUsername(string $username): self
1717
{
18-
return new static("Ce pseudo [{$username}] existe déjà.");
18+
return new CannotCreateUser("Ce pseudo [{$username}] existe déjà.");
1919
}
2020
}

Diff for: app/Models/User.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
use Illuminate\Support\Facades\Auth;
2525
use Laravel\Sanctum\HasApiTokens;
2626
use Laravel\Socialite\Contracts\User as SocialUser;
27+
use Laravelcm\Subscriptions\Traits\HasPlanSubscriptions;
2728
use LaravelFeature\Featurable\Featurable;
2829
use LaravelFeature\Featurable\FeaturableInterface;
2930
use QCod\Gamify\Gamify;
30-
// use Rinvex\Subscriptions\Traits\HasPlanSubscriptions;
3131
use Spatie\MediaLibrary\HasMedia;
3232
use Spatie\MediaLibrary\InteractsWithMedia;
3333
use Spatie\Permission\Traits\HasRoles;
@@ -41,7 +41,7 @@ final class User extends Authenticatable implements MustVerifyEmail, HasMedia, F
4141
use Gamify;
4242
use HasApiTokens;
4343
use HasFactory;
44-
// use HasPlanSubscriptions;
44+
use HasPlanSubscriptions;
4545
use HasProfilePhoto;
4646
use HasRoles;
4747
use HasSettings;

Diff for: app/Providers/EventServiceProvider.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ final class EventServiceProvider extends ServiceProvider
5252
\SocialiteProviders\Twitter\TwitterExtendSocialite::class.'@handle',
5353
],
5454

55-
ApiRegistered::class => [
56-
SendCompanyEmailVerificationNotification::class,
57-
SendWelcomeCompanyNotification::class,
58-
],
55+
// ApiRegistered::class => [
56+
// SendCompanyEmailVerificationNotification::class,
57+
// SendWelcomeCompanyNotification::class,
58+
// ],
5959

6060
SponsoringPaymentInitialize::class => [
6161
SendPaymentNotification::class,

Diff for: app/Providers/FortifyServiceProvider.php

+11-3
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,24 @@ public function boot(): void
2626
Fortify::loginView(fn () => view('auth.login'));
2727
Fortify::registerView(fn () => view('auth.register'));
2828
Fortify::requestPasswordResetLinkView(fn () => view('auth.forgot-password'));
29-
Fortify::resetPasswordView(fn ($request) => view('auth.reset-password', ['request' => $request]));
29+
Fortify::resetPasswordView(fn (Request $request) => view('auth.reset-password', ['request' => $request]));
3030
Fortify::verifyEmailView(fn () => view('auth.verify-email'));
3131

3232
Fortify::createUsersUsing(CreateNewUser::class);
3333
Fortify::updateUserProfileInformationUsing(UpdateUserProfileInformation::class);
3434
Fortify::updateUserPasswordsUsing(UpdateUserPassword::class);
3535
Fortify::resetUserPasswordsUsing(ResetUserPassword::class);
3636

37-
RateLimiter::for('login', fn (Request $request) => Limit::perMinute(5)->by($request->email.$request->ip()));
37+
RateLimiter::for(
38+
'login',
39+
fn (Request $request) => Limit::perMinute(5)
40+
->by($request->email.$request->ip())
41+
);
3842

39-
RateLimiter::for('two-factor', fn (Request $request) => Limit::perMinute(5)->by($request->session()->get('login.id')));
43+
RateLimiter::for(
44+
'two-factor',
45+
fn (Request $request) => Limit::perMinute(5)
46+
->by($request->session()->get('login.id'))
47+
);
4048
}
4149
}

Diff for: app/Providers/RouteServiceProvider.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ public function boot(): void
2222
$this->routeBindings();
2323

2424
$this->routes(function (): void {
25-
Route::prefix('api')
26-
->middleware('api')
27-
->namespace($this->namespace)
28-
->group(base_path('routes/api.php'));
25+
// Route::prefix('api')
26+
// ->middleware('api')
27+
// ->namespace($this->namespace)
28+
// ->group(base_path('routes/api.php'));
2929

3030
Route::middleware('web')
3131
->namespace($this->namespace)

Diff for: lang/en.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"The :attribute must be at least :length characters.": "The :attribute must be at least :length characters.",
3-
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute."
3+
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "The given :attribute has appeared in a data leak. Please choose a different :attribute.",
4+
"Verify Email Address": "Verify Email Address",
5+
"Please click the button below to verify your email address.": "Please click the button below to verify your email address.",
6+
"If you did not create an account, no further action is required.": "If you did not create an account, no further action is required."
47
}

Diff for: lang/fr.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"The :attribute must be at least :length characters.": "Le champ :attribute doit contenir au moins :length caractères.",
3-
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "Le champ :attribute donné est apparu dans une fuite de données. Veuillez choisir un autre :attribute."
3+
"The given :attribute has appeared in a data leak. Please choose a different :attribute.": "Le champ :attribute donné est apparu dans une fuite de données. Veuillez choisir un autre :attribute.",
4+
"Verify Email Address": "Vérifier l'adresse e-mail",
5+
"Please click the button below to verify your email address.": "Veuillez cliquer sur le bouton ci-dessous pour vérifier votre adresse email.",
6+
"If you did not create an account, no further action is required.": "Si vous n'avez pas créé de compte, aucune autre action n'est requise."
47
}

0 commit comments

Comments
 (0)