- Complete GGZ Ecademy Laravel backend application - RESTful API for learning products, members, filters - Authentication and authorization system - Database migrations and seeders - Custom CRUD generator commands - Email notification system - Integration with frontend applications
This commit is contained in:
32
app/Http/Requests/Component/ComponentSort.php
Normal file
32
app/Http/Requests/Component/ComponentSort.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Component;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ComponentSort 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"model_id" => 'required',
|
||||
"model" => 'required',
|
||||
"components_ids" => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
33
app/Http/Requests/Component/ComponentStore.php
Normal file
33
app/Http/Requests/Component/ComponentStore.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Component;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ComponentStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'name' => 'required',
|
||||
'description' => '',
|
||||
'content' => '',
|
||||
'component_type_id' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/Component/ComponentSync.php
Normal file
32
app/Http/Requests/Component/ComponentSync.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Component;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ComponentSync 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"model_id" => 'required',
|
||||
"model" => 'required',
|
||||
"components_ids" => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/Filter/FilterItemStore.php
Normal file
32
app/Http/Requests/Filter/FilterItemStore.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Filter;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FilterItemStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'required_without:filter_id|numeric',
|
||||
"filter_id" => 'required_without:id|numeric',
|
||||
"title" => 'required|max:255',
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/Filter/FilterStore.php
Normal file
31
app/Http/Requests/Filter/FilterStore.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Filter;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class FilterStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"title" => 'required|max:255',
|
||||
];
|
||||
}
|
||||
}
|
||||
35
app/Http/Requests/Learning/AccreditationStore.php
Normal file
35
app/Http/Requests/Learning/AccreditationStore.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Learning;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AccreditationStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"learning_product_id" => 'required|numeric',
|
||||
'credits' => 'required',
|
||||
'date_start' => '',
|
||||
'date_end' => '',
|
||||
'filter_items' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
38
app/Http/Requests/Learning/CourseNotificationStore.php
Normal file
38
app/Http/Requests/Learning/CourseNotificationStore.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Learning;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class CourseNotificationStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"learning_product_id" => 'required|numeric',
|
||||
'date' => 'required',
|
||||
'sent' => '',
|
||||
'time' => 'required',
|
||||
'emails' => 'required',
|
||||
'users' => 'required',
|
||||
'subject' => 'required',
|
||||
'message' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/Learning/LearningProductId.php
Normal file
30
app/Http/Requests/Learning/LearningProductId.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Learning;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class LearningProductId 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"product_id" => 'required|numeric',
|
||||
];
|
||||
}
|
||||
}
|
||||
74
app/Http/Requests/Learning/LearningProductStore.php
Normal file
74
app/Http/Requests/Learning/LearningProductStore.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Learning;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class LearningProductStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"parent_id" => 'sometimes|numeric',
|
||||
"title" => 'required|max:255',
|
||||
'description' => 'max:255',
|
||||
'video' => 'max:255',
|
||||
'code' => 'required|max:255',
|
||||
'seo_title' => 'required|max:255',
|
||||
'meta_description' => 'max:255',
|
||||
'url' => 'max:255',
|
||||
'published' => '',
|
||||
'lead_time' => '',
|
||||
'short_description' => '',
|
||||
'learning_goals' => '',
|
||||
'review' => '',
|
||||
'certification' => '',
|
||||
'extra_information' => '',
|
||||
'target_audience' => '',
|
||||
'quality_standards' => '',
|
||||
'in_the_picture' => '',
|
||||
'in_the_picture_start' => 'required_if:in_the_picture,1',
|
||||
'in_the_picture_end' => 'required_if:in_the_picture,1',
|
||||
'owner' => '',
|
||||
'partner' => '',
|
||||
'supplier' => '',
|
||||
'contract_agreements' => '',
|
||||
'tile' => 'sometimes|mimes:jpeg,jpg,png|max:2048',
|
||||
'cover' => 'sometimes|mimes:jpeg,jpg,png|max:2048',
|
||||
'prognosis_members' => '',
|
||||
'prognosis_attendees' => '',
|
||||
'sharepoint_link' => 'max:500',
|
||||
'support_link' => 'max:500',
|
||||
'support_tickets_link' => 'max:500',
|
||||
'for_members' => '',
|
||||
'third_party_training' => '',
|
||||
'voor_opleiders' => '',
|
||||
'filtersGrouped' => '',
|
||||
'synonymsSelected' => '',
|
||||
];
|
||||
}
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
'title.required' => 'De titel is verplicht.',
|
||||
'code.required' => 'De productcode is verplicht',
|
||||
'seo_title.required' => 'De SEO title is verplicht',
|
||||
];
|
||||
}
|
||||
}
|
||||
30
app/Http/Requests/Learning/SynonymStore.php
Normal file
30
app/Http/Requests/Learning/SynonymStore.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Learning;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SynonymStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"title" => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
39
app/Http/Requests/Learning/VersionStore.php
Normal file
39
app/Http/Requests/Learning/VersionStore.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Learning;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class VersionStore 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.Nc
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"learning_product_id" => 'required|numeric',
|
||||
'filter_items' => '',
|
||||
'version_number' => 'required',
|
||||
'release_start' => 'required',
|
||||
'release_end' => '',
|
||||
'release_planning_date' => '',
|
||||
'release_planning_description' => '',
|
||||
'technical_information' => '',
|
||||
'checklists_selected' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
47
app/Http/Requests/Member/AddressStore.php
Normal file
47
app/Http/Requests/Member/AddressStore.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Member;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class AddressStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"member_id" => 'required|numeric',
|
||||
'indicating' => '',
|
||||
'type' => 'required|max:255',
|
||||
'first_name_contact_person' => '',
|
||||
'last_name_contact_person' => '',
|
||||
'infix' => '',
|
||||
'email' => 'required_if:type,==,invoice',
|
||||
'phone' => '',
|
||||
'address' => '',
|
||||
'postal' => '',
|
||||
'city' => '',
|
||||
'title_contact_person' => '',
|
||||
'initials_contact_person' => '',
|
||||
'middle_name_contact_person' => '',
|
||||
'job_title_contact_person' => '',
|
||||
'house_number' => '',
|
||||
'country' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/Member/BranchStore.php
Normal file
31
app/Http/Requests/Member/BranchStore.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Member;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class BranchStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"title" => 'required|max:255',
|
||||
];
|
||||
}
|
||||
}
|
||||
44
app/Http/Requests/Member/ContactStore.php
Normal file
44
app/Http/Requests/Member/ContactStore.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Member;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ContactStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"member_id" => 'required|numeric',
|
||||
'function' => '',
|
||||
'salutation' => '',
|
||||
'initials' => '',
|
||||
'firstname' => 'required',
|
||||
'middlename' => '',
|
||||
'lastname' => 'required',
|
||||
'email' => 'required|email',
|
||||
'email2' => 'nullable|email',
|
||||
'email3' => 'nullable|email',
|
||||
'phone' => '',
|
||||
'job_title' => '',
|
||||
'mobile' => '',
|
||||
'address_id' => 'nullable|numeric',
|
||||
];
|
||||
}
|
||||
}
|
||||
34
app/Http/Requests/Member/ContributionStore.php
Normal file
34
app/Http/Requests/Member/ContributionStore.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Member;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ContributionStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"member_id" => 'required|numeric',
|
||||
"year" => 'required|numeric',
|
||||
"contribution" => 'required|numeric',
|
||||
"toAll" => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
34
app/Http/Requests/Member/ManagementLinkStore.php
Normal file
34
app/Http/Requests/Member/ManagementLinkStore.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Member;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ManagementLinkStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'id' => 'sometimes|numeric',
|
||||
'member_id' => 'sometimes|numeric',
|
||||
'title' => '',
|
||||
'url' => '',
|
||||
'target' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
60
app/Http/Requests/Member/MemberStore.php
Normal file
60
app/Http/Requests/Member/MemberStore.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Member;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class MemberStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"user_id" => 'sometimes|numeric',
|
||||
"branch_id" => 'numeric',
|
||||
"sub_branches" => '',
|
||||
'type' => '',
|
||||
"informal_name" => 'required|max:255',
|
||||
"formal_name" => 'required|max:255',
|
||||
"kvk_number" => 'required|numeric',
|
||||
'website' => '',
|
||||
'logo' => 'sometimes|mimes:jpeg,jpg,png|max:2048',
|
||||
'show_on_website' => '',
|
||||
'helpdesk_department' => '',
|
||||
'helpdesk_contact_person' => '',
|
||||
'helpdesk_email' => '',
|
||||
'helpdesk_phone' => '',
|
||||
'info_department' => '',
|
||||
'info_contacteperson' => '',
|
||||
'info_email' => '',
|
||||
'info_phone' => '',
|
||||
'info_address' => '',
|
||||
'info_housenumber' => '',
|
||||
'info_postal' => '',
|
||||
'info_city' => '',
|
||||
'info_country' => '',
|
||||
'info_link' => '',
|
||||
'more_info_link' => '',
|
||||
|
||||
'start_membership' => '',
|
||||
'end_membership' => '',
|
||||
'contribution' => '',
|
||||
'invoice_number' => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
33
app/Http/Requests/Member/RevisionStore.php
Normal file
33
app/Http/Requests/Member/RevisionStore.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Member;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class RevisionStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"member_id" => 'sometimes|numeric',
|
||||
"user_id" => 'numeric',
|
||||
"data" => 'required'
|
||||
];
|
||||
}
|
||||
}
|
||||
35
app/Http/Requests/Member/SummaryStore.php
Normal file
35
app/Http/Requests/Member/SummaryStore.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Member;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class SummaryStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"member_id" => 'required|numeric',
|
||||
"year" => 'required|numeric',
|
||||
"real_number_last_year" => 'required|numeric',
|
||||
"estimated_number_next_year" => 'required|numeric',
|
||||
"toAll" => '',
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/Page/ComponentPageDelete.php
Normal file
31
app/Http/Requests/Page/ComponentPageDelete.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Page;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ComponentPageDelete 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"page_id" => 'required|numeric',
|
||||
"component_id" => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
32
app/Http/Requests/Page/ComponentPageStore.php
Normal file
32
app/Http/Requests/Page/ComponentPageStore.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Page;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ComponentPageStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"page_id" => 'required|numeric',
|
||||
"content" => '',
|
||||
"component_type_id" => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
33
app/Http/Requests/Page/PageStore.php
Normal file
33
app/Http/Requests/Page/PageStore.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Page;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class PageStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"title" => 'required|max:255',
|
||||
"subtitle" => 'max:255',
|
||||
"slug" => 'max:255',
|
||||
];
|
||||
}
|
||||
}
|
||||
31
app/Http/Requests/User/Login.php
Normal file
31
app/Http/Requests/User/Login.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\User;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class Login 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'email' => 'required|email',
|
||||
'password' => 'required',
|
||||
];
|
||||
}
|
||||
}
|
||||
36
app/Http/Requests/User/UserStore.php
Normal file
36
app/Http/Requests/User/UserStore.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\User;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UserStore 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.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
"id" => 'sometimes|numeric',
|
||||
"first_name" => 'required|max:255',
|
||||
"last_name" => 'required|max:255',
|
||||
'email' => 'required|email',
|
||||
'password' => 'sometimes|confirmed|min:8',
|
||||
'roles' => '',
|
||||
'image' => 'sometimes|mimes:jpeg,jpg,png|max:2048',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user