Which works fine and dandy for out putting errors but then when I actually do what I am checking for correctly and upload an image with the right file size and file extension it gives the error:
Call to a member function fails() on a non-object (null)
How can that be when it works and it is an object but only if something is wrong?
$this->validate($request, $rules);is a method which takes care of validating, redirecting etc, does not return anything, hence the error. You don't need to specifically check if it fails.
$this->validate(); // global helper method which handles validation (succeeds or fails etc) and automatically applies the errors to the $errors variable
Validator::make(); // Facade, handle it how you want it to be handled.
Yeah I found some documentation on this and tried implementing...although not exactly as you have done but i just gave it a try and it gave the same results...I should have mentioned what I have and is semi working is:
If it failed the if statement works and the fail() function works as it redirects there and before i implemented this it did return to the correct view as is stated in the last line but now it errors out saying fails() isnt even a thing?
When I implement as you suggested I just get a white screen no matter if the input is correct or not so I dont know whats happening there...
@Jaytee - so I'm guessing why the suggested Validator::make(); doesnt work for me and just gives me a white page is because its not putting it into $errors anymore?