10 changed files with 78 additions and 158 deletions
-
19app/Entities/Users/UserPresenter.php
-
40app/Http/Controllers/AuthController.php
-
39app/Http/Requests/Accounts/LoginRequest.php
-
38app/Http/Requests/Accounts/UpdateProfileRequest.php
-
2resources/lang/id/auth.php
-
38resources/lang/id/user.php
-
13resources/views/auth/change-password.blade.php
-
32resources/views/auth/profile.blade.php
-
10resources/views/pages/home.blade.php
-
5resources/views/reports/current-credits.blade.php
@ -1,39 +0,0 @@ |
|||||
<?php |
|
||||
|
|
||||
namespace App\Http\Requests\Accounts; |
|
||||
|
|
||||
use App\Http\Requests\Request; |
|
||||
|
|
||||
class LoginRequest extends Request |
|
||||
{ |
|
||||
/** |
|
||||
* Determine if the user is authorized to make this request. |
|
||||
* |
|
||||
* @return bool |
|
||||
*/ |
|
||||
public function authorize() |
|
||||
{ |
|
||||
return auth()->guest(); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* Get the validation rules that apply to the request. |
|
||||
* |
|
||||
* @return array |
|
||||
*/ |
|
||||
public function rules() |
|
||||
{ |
|
||||
return [ |
|
||||
'email' => 'required|email', |
|
||||
'password' => 'required', |
|
||||
]; |
|
||||
} |
|
||||
|
|
||||
public function messages() |
|
||||
{ |
|
||||
return [ |
|
||||
'email.required' => 'Email harus diisi.', |
|
||||
'password.required' => 'Password harus diisi.', |
|
||||
]; |
|
||||
} |
|
||||
} |
|
||||
@ -1,38 +0,0 @@ |
|||||
<?php |
|
||||
|
|
||||
namespace App\Http\Requests\Accounts; |
|
||||
|
|
||||
use App\Http\Requests\Request; |
|
||||
|
|
||||
class UpdateProfileRequest extends Request |
|
||||
{ |
|
||||
/** |
|
||||
* Determine if the user is authorized to make this request. |
|
||||
* |
|
||||
* @return bool |
|
||||
*/ |
|
||||
public function authorize() |
|
||||
{ |
|
||||
return auth()->check(); |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* Get the validation rules that apply to the request. |
|
||||
* |
|
||||
* @return array |
|
||||
*/ |
|
||||
public function rules() |
|
||||
{ |
|
||||
return [ |
|
||||
'name' => 'required|max:60' |
|
||||
]; |
|
||||
} |
|
||||
|
|
||||
public function messages() |
|
||||
{ |
|
||||
return [ |
|
||||
'name.required' => 'Nama harus diisi.', |
|
||||
'name.max' => 'Nama maksimal 60 karakter.', |
|
||||
]; |
|
||||
} |
|
||||
} |
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue