Files
projectsend/app/Providers/AppServiceProvider.php
T
ignacionelson 6e47d76ba6 ProjectSend 2.0.0
Client file sharing, rebuilt from the ground up: a private area per
client, resumable uploads, folders, groups and categories, sharing with
expiry dates and download limits, comments, file versions, an activity
log, a REST API, and sixteen languages.

This repository begins here. ProjectSend 2 was developed privately, and
that development history is not published — the previous generation
remains available, with its own history, at projectsend/legacy.

Free software under the GNU General Public License v2, or (at your
option) any later version.
2026-08-14 01:38:12 -03:00

35 lines
1.0 KiB
PHP

<?php
namespace App\Providers;
use App\Modules\Identity\Passwords\PasswordPolicy;
use Illuminate\Support\ServiceProvider;
use Illuminate\Validation\Rules\Password;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*/
public function register(): void
{
//
}
/**
* Bootstrap any application services.
*/
public function boot(): void
{
// Every password field in the app validates with Password::defaults()
// — setup, client registration, admin-set passwords, self-service
// change, reset. Laravel's bare default is min(8) and nothing else;
// what this installation asks for instead lives in PasswordPolicy.
//
// The closure matters: Password::defaults() invokes it at validation
// time, not here, so the policy can read settings out of the database
// without this provider needing one at boot.
Password::defaults(fn (): Password => $this->app->make(PasswordPolicy::class)->rule());
}
}