for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PiFinder\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
abstract class Request extends FormRequest
{
public function __construct()
parent::__construct();
$this->validateMac();
}
public function validateMac()
app('validator')->extend('mac', function ($attribute, $value, $parameters) {
$parameters
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
return preg_match('/^(([0-9a-fA-F]{2}-){5}|([0-9a-fA-F]{2}:){5})[0-9a-fA-F]{2}$/', $value);
});
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.