1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-06 03:02:34 +01:00
invoiceninja/app/Http/Requests/Migration/UploadMigrationFileRequest.php
Benjamin Beganović 01c47d7c5d (Sync) beganovich:v2 to invoiceninja:v2 (#3254)
* Add more checks to invoice test

* Uploading migration file & test

* Comment redundant tests

* Improve tests with smaller sample files. (#3250)

* Reduce migration file size to improve test velocity

* minor fixes

* remove xhprof ext

* Tests for templates

* Remove commented tests

* Fix invoices testing & importing

* Sending e-mail when migration fails

* Uploading & storing the migration file
- Added Swagger notation
- Added MigrationTest.php method

Co-authored-by: David Bomba <turbo124@gmail.com>
2020-01-28 07:56:48 +11:00

31 lines
587 B
PHP

<?php
namespace App\Http\Requests\Migration;
use Illuminate\Foundation\Http\FormRequest;
class UploadMigrationFileRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return auth()->user()->isAdmin();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'migration' => [], // TODO: Write mimes check for zip file.
];
}
}