globalxtreme / validation
GlobalXtreme Validation Pattern
v1.1.2
2024-06-10 10:24 UTC
Requires
- php: 8.*
- globalxtreme/response: ^v2.0
This package is auto-updated.
Last update: 2024-11-10 19:08:20 UTC
README
Install with composer
To install with Composer, simply require the latest version of this package.
composer require globalxtreme/validation
Using
- Publish the stubs for custom your request.
php artisan vendor:publish --provider="GlobalXtreme\Validation\ValidationServiceProvider"
- You can generate laravel request class with. Ex: CustomRequest
php artisan make:request CustomRequest
- Using validation with controller.
use App\Http\Controllers\Controller; use App\Http\Requests\CustomRequest; use GlobalXtreme\Validation\Validator; class CustomController extends Controller { public function testing(CustomRequest $request) { // You can custom validator using gx response Validator::make($request->all(), ['foo' => 'required']); } }