Attendize/app/Http/Requests/HelpTicketRequest.php

60 lines
1.1 KiB
PHP
Raw Normal View History

2020-04-29 11:48:01 +00:00
<?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
use Illuminate\Foundation\Http\FormRequest;
class HelpTicketRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
// only allow updates if the user is logged in
2020-05-01 11:06:04 +00:00
return true;//backpack_auth()->check();
2020-04-29 11:48:01 +00:00
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'email' => 'required|email',
2020-04-30 12:39:58 +00:00
'topic' => 'required',
2020-04-29 11:48:01 +00:00
'text' => 'required',
2020-05-04 12:36:16 +00:00
'attachment' => 'image|mimes:jpeg,png,jpg,gif|max:1024'
2020-04-29 11:48:01 +00:00
];
}
/**
* Get the validation attributes that apply to the request.
*
* @return array
*/
public function attributes()
{
return [
//
];
}
/**
* Get the validation messages that apply to the request.
*
* @return array
*/
public function messages()
{
return [
//
];
}
}