required if validation in laravel example
Example 1: laravel required if
"sale_price" => "required_if:list_type,==,selling"
Example 2: laravel validation
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Validator::extend(...);
Validator::replacer('foo', function ($message, $attribute, $rule, $parameters) {
return str_replace(...);
});
}