protected function translateLocationId($oldLocationId)
    {
        $location = ScoolLocation::where('name',Location::findOrFail($oldLocationId)->name)->first();
        if ( $location != null ) {
            return $location->id;
        }
        throw new LocationNotFoundByNameException();
    }
protected function translateLocationId($oldLocationId)
    {
        $location = ScoolLocation::where('name',Location::findOrFail($oldLocationId)->name)->first();
        if ( $location != null ) {
            return $location->id;
        }
        throw new LocationNotFoundByNameException();
    }
protected function translateLocationId ( $ oldLocationId ) { $ location = ScoolLocation :: where ( 'name' , Location :: findOrFail ( $ oldLocationId ) -> name ) -> first ( ) ; if ( $ location != null ) { return $ location -> id ; } throw new LocationNotFoundByNameException ( ) ; }
Translate location id.

@param $oldLocationId
@return mixed
@throws LocationNotFoundByNameException
Translate location id .