Class 'app\Location' not found

Posted 1 year ago by muazzamazaz

calling class here in controller:

use app/Location;

....


$validator = Location::getValidatedData($request);

in app folder I have class file Location with class and above function as:

namespace App\Admin;

use Illuminate\Database\Eloquent\Model;
use Symfony\Component\HttpFoundation\Request;
use Validator;

class Location extends Model
{
    public static function getValidatedData(Request $request)
    {
        $data = new Location();
        return $data->passDataThroughValidator($request);
    }
}

Please sign in or create an account to participate in this conversation.