You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
741 B
39 lines
741 B
<?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 [
|
|
'username' => 'required',
|
|
'password' => 'required',
|
|
];
|
|
}
|
|
|
|
public function messages()
|
|
{
|
|
return [
|
|
'username.required' => 'Username harus diisi.',
|
|
'password.required' => 'Password harus diisi.',
|
|
];
|
|
}
|
|
}
|