Skip to content

Commit

Permalink
Merge pull request #39 from lolibrary/master
Browse files Browse the repository at this point in the history
Merge master into branch
  • Loading branch information
momijizukamori authored Aug 5, 2023
2 parents 3e65eef + 356d7ac commit efa3317
Show file tree
Hide file tree
Showing 45 changed files with 6,265 additions and 104 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function validator(array $data)
'unique:users',
],
'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
'password' => ['required', 'string', 'min:8', 'confirmed'],
'password' => ['required', 'string', 'min:12', 'confirmed'],
]);
}

Expand Down
48 changes: 48 additions & 0 deletions app/Http/Controllers/ProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Rule;
use Illuminate\Auth\Events\Registered;

class ProfileController extends Controller
{
Expand All @@ -29,6 +32,51 @@ public function profile()
return view('profile.index', compact('user'));
}

/**
* Let users update their info.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function update(Request $request)
{
$user = Auth::user();
$validatedData = $request->validate([
'name' => 'required|string|max:255',
'username' => [
'required',
'string',
'min:3',
'max:40',
'regex:/^[^-_][0-9a-z_-]+$/u',
Rule::unique('users')->ignore($user),
],
'email' => ['required', 'string', 'max:255', 'email', Rule::unique('users')->ignore($user)],
'password' => 'nullable|string|confirmed|min:12',
]);

$status = 'ui.auth.update';

$user->name = $validatedData['name'];
$user->username = $validatedData['username'];

if ($user->email != $validatedData['email']) {
// If they've updated their email address, they need to re-verify it.
$user->email = $validatedData['email'];
$user->email_verified_at = NULL;
event(new Registered($user));
$status = 'ui.auth.verify_update';
}

if ($validatedData['password']) {
$user->password = Hash::make($validatedData['password']);
}

$user->save();

return redirect('profile')->with('status', $status);
}

/**
* Get a user's closet (owned items).
*
Expand Down
30 changes: 30 additions & 0 deletions resources/lang/el/categories.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php
return [
'cape' => '',
'publications' => '',
'hair-accessories' => '',
'corsetbustier' => '',
'unmentionables' => '',
'cutsew' => '',
'petticoat' => '',
'vest' => '',
'cardigan' => '',
'blouse' => '',
'accessories' => '',
'bolero' => '',
'other' => '',
'bloomers' => '',
'apron' => '',
'socks' => '',
'jsk' => '',
'umbrellas-parasols' => '',
'salopette' => '',
'pants' => '',
'skirt' => '',
'shoes' => '',
'coats' => '',
'bags' => '',
'jewelry' => '',
'sets' => '',
'op' => '',
];
63 changes: 63 additions & 0 deletions resources/lang/el/features.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
return [
'oxford' => '',
'open-heel' => '',
'ankle-boot' => '',
'open-toe' => '',
'wedge' => '',
'kimono-sleeves' => '',
'frog-closure' => '',
'sandal' => '',
'style-boot' => '',
'shoes-lacing' => '',
'platform' => '',
'underbust' => '',
'detachable-yoke' => '',
'detachable-strap' => '',
'detachable-apron' => '',
'convertible-straps' => '',
'halter-neckline' => '',
'capelet' => '',
'tucks' => '',
'jabot' => '',
'sailor-collar' => '',
'no-sleeves' => '',
'hood' => '',
'dropped-waist' => '',
'boning' => '',
'removable-collar' => '',
'built-in-petticoat' => '',
'removable-belt' => '',
'detachable-sleeves' => '',
'princess-sleeves' => '',
'corset-lace-(decorative)' => '',
'removable-sash' => '',
'empire-waist' => '',
'neck-ties' => '',
'scalloped' => '',
'bustled' => '',
'buttoned-front' => '',
'detachable-trim' => '',
'back zip' => '',
'pleats' => '',
'elasticized-cuffs' => '',
'high-neck-collar' => '',
'adjustable-straps' => '',
'full-shirring' => '',
'pintucks' => '',
'buttoned-cuffs' => '',
'peter-pan-collar' => '',
'back-shirring' => '',
'high-waist' => '',
'pockets' => '',
'tiered-skirt' => '',
'side-zip' => '',
'detachable-waist-ties' => '',
'partial-shirring' => '',
'short-sleeves' => '',
'detachable-bow' => '',
'corset-lacing' => '',
'long-sleeves' => '',
'no-shirring' => '',
'lining' => '',
];
Loading

0 comments on commit efa3317

Please sign in to comment.