Skip to content

Commit

Permalink
Merge pull request #484 from andreapollastri/4.x
Browse files Browse the repository at this point in the history
Sites Wip
  • Loading branch information
andreapollastri authored Mar 17, 2024
2 parents 0d7aae1 + 868de81 commit 1c4fe2f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/Filament/Resources/SiteResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ class SiteResource extends Resource

public static function form(Form $form): Form
{
$username = Str::lower(Str::random(12));
$username = 'cp'.Str::lower(Str::random(10));
$password = Str::random(16);

return $form
->schema([
Expand All @@ -28,6 +29,8 @@ public static function form(Form $form): Form
->maxLength(255),
Forms\Components\Hidden::make('username')
->default($username),
Forms\Components\Hidden::make('password')
->default($password),
Forms\Components\Select::make('basepath')
->required()
->prefix('/home/'.$username.'/www')
Expand Down

0 comments on commit 1c4fe2f

Please sign in to comment.