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 $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 class User extends FormRequest
{ {
/** /**
* Determine if the user is authorized to make this request. * 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 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Reconciliation extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class ReconciliationCalculate extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -3,20 +3,10 @@
namespace App\Http\Requests\Banking; namespace App\Http\Requests\Banking;
use App\Abstracts\Http\FormRequest; use App\Abstracts\Http\FormRequest;
use Date; use App\Utilities\Date;
class Transaction extends FormRequest 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Transfer extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class BulkAction extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use Illuminate\Foundation\Http\FormRequest;
class Company extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Contact extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Dashboard extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use Illuminate\Foundation\Http\FormRequest;
class Import extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Item extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class ItemTax extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Notification extends 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. * Get the validation rules that apply to the request.
* *

View File

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

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class TotalItem extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Widget extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -9,16 +9,6 @@ use Illuminate\Support\Str;
class Document extends FormRequest 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentAddItem extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentHistory extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentItem extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentItemTax extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class DocumentTotal extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Database extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Setting extends 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. * 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class InvoiceConfirm extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class InvoicePayment extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use Illuminate\Foundation\Http\FormRequest;
class Profile extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Category extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Currency extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Module extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Setting extends 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. * Get the validation rules that apply to the request.
* *

View File

@ -6,16 +6,6 @@ use App\Abstracts\Http\FormRequest;
class Tax extends 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. * 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. * Get the validation rules that apply to the request.
* *