Added eloquent function to grab applications from departments