This commit is contained in:
James Cole
2016-10-22 22:03:00 +02:00
parent 49e32abd3f
commit a8a8afc2be
6 changed files with 32 additions and 21 deletions

View File

@@ -37,7 +37,7 @@ class AccountFormRequest extends Request
/**
* @return array
*/
public function getAccountDate(): array
public function getAccountData(): array
{
return [
'name' => trim($this->input('name')),

View File

@@ -30,6 +30,18 @@ class AttachmentFormRequest extends Request
return auth()->check();
}
/**
* @return array
*/
public function getAttachmentData(): array
{
return [
'title' => trim($this->input('title')),
'description' => trim($this->input('description')),
'notes' => trim($this->input('notes')),
];
}
/**
* @return array
*/

View File

@@ -29,10 +29,21 @@ class BudgetFormRequest extends Request
*/
public function authorize()
{
// Only allow logged in users
return auth()->check();
}
/**
* @return array
*/
public function getBudgetData(): array
{
return [
'name' => trim($this->input('name')),
'user' => auth()->user()->id,
'active' => intval($this->input('active')) == 1,
];
}
/**
* @return array
*/