Skip to content

WebRegul/lumen-form-request

Repository files navigation

Lumen Form Request

Latest Version on Packagist Software License StyleCI

Adopt the Laravel Form Request to Lumen framework. Используется namespace Illuminate\Foundation\ для совместимости со Scribe

Installation

You can install the package via composer:

composer require webregul/lumen-form-request

Register the service provider in your boostrap/app.php configuration file:

$app->register(Illuminate\Foundation\Providers\FormRequestServiceProvider::class);

Usage

Let's continue the official Laravel's documantation.

По дефолту добавлены кастомизированные сообщения об ошибках. Для их отключения в Request классе объявить:

public static bool $disableDefaultMessages = false;

либо использовать метод messages() Для добавления собственных ошибок без отключения дефолтных:

public static array $messages = [
    'rule' => 'custom message'; //будет добавлено к сообщениям, либо заменит дефолтное при совпадении правила
];

License

This package is licensed under The MIT License (MIT).

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages