added authorize to form request abstract

This commit is contained in:
Denis Duliçi 2021-07-01 10:50:24 +03:00
parent 1a0642f6a6
commit 500ff054db
37 changed files with 16 additions and 348 deletions

View File

@ -32,4 +32,14 @@ abstract class FormRequest extends BaseFormRequest
$offset
);
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}

View File

@ -17,14 +17,4 @@ class $CLASS$ extends FormRequest
//
];
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
}

View File

@ -6,7 +6,6 @@ use Illuminate\Foundation\Http\FormRequest;
class User extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Account extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Reconciliation extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class ReconciliationCalculate extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -3,20 +3,10 @@
namespace App\Http\Requests\Banking;
use App\Abstracts\Http\FormRequest;
use Date;
use App\Utilities\Date;
class Transaction extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Transfer extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class BulkAction extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use Illuminate\Foundation\Http\FormRequest;
class Company extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Contact extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Dashboard extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use Illuminate\Foundation\Http\FormRequest;
class Import extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Item extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class ItemTax extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Notification extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,12 +6,11 @@ use App\Abstracts\Http\FormRequest;
class Report extends FormRequest
{
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class TotalItem extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Widget extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -9,16 +9,6 @@ use Illuminate\Support\Str;
class Document extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentAddItem extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentHistory extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentItem extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentItemTax extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentTotal extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Database extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Setting extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -21,16 +21,6 @@ class Module extends FormRequest
);
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class InvoiceConfirm extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class InvoicePayment extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use Illuminate\Foundation\Http\FormRequest;
class Profile extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Category extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Currency extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Module extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Setting extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Tax extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*

View File

@ -21,16 +21,6 @@ class Company extends FormRequest
);
}
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that apply to the request.
*