mirror of
https://github.com/snipe/snipe-it.git
synced 2026-02-05 13:35:30 +00:00
condition makes this work, needs more testing
This commit is contained in:
@ -11,6 +11,7 @@ use App\Models\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Input;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\View;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Redirect;
|
||||
@ -513,9 +514,8 @@ class AssetModelsController extends Controller
|
||||
|
||||
$validator = Validator::make($data, $rules);
|
||||
|
||||
// Okay, this is the problem. Seems to be failing every time, kind of makes sense because it looks like
|
||||
// $rules is an empty array, but I need to wrap my head around this entire method a little more.
|
||||
if($validator->fails()){
|
||||
Log::debug($validator->errors());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user