One Hat Cyber Team
Your IP:
216.73.216.208
Server IP:
198.54.114.155
Server:
Linux server71.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
Server Software:
LiteSpeed
PHP Version:
5.6.40
Create File
|
Create Folder
Execute
Dir :
~
/
home
/
fluxyjvi
/
www
/
project
/
app
/
Http
/
Requests
/
Edit File:
CategoryRequest.php
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; use Illuminate\Support\Facades\Auth; class CategoryRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return Auth::check(); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'name'=> 'required', 'slug' => 'required|unique:categories|regex:/^[a-zA-Z0-9\s-]+$/', 'photo' => 'mimes:jpeg,jpg,png,svg', ]; } public function messages() { return [ 'name.required' => __('Name field is required.'), 'photo.mimes' => __('Photo Type is Invalid.'), 'slug.unique' => __('This slug has already been taken.'), 'slug.regex' => __('Slug Must Not Have Any Special Characters.'), ]; } }
Simpan