34 lines
745 B
PHP
34 lines
745 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\ServiceAccounts;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class StoreServiceAccountsRequest extends FormRequest
|
|
{
|
|
/**
|
|
* Determine if the user is authorized to make this request.
|
|
*
|
|
* @return boolean
|
|
*/
|
|
public function authorize()
|
|
{
|
|
return Auth::check();
|
|
}
|
|
|
|
/**
|
|
* Get the validation rules that apply to the request.
|
|
*
|
|
* @return array
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
'name' => 'required|min:2|max:255',
|
|
'url' => 'required|min:2|max:255|url',
|
|
'account' => 'required|min:2|max:255',
|
|
'password' => 'required|max:255'
|
|
];
|
|
}
|
|
}
|